|
As I was building the blog post / demo video, I found a gap which we missed:
A template with "enroll on <b>client.activationDate" ==> "enroll on 2013.0, 8.0, 9.0" ... we need some at least simple "formatting helper functions"!
I'd imagine something like: ""enroll on <b>convert.mifosDateArray({{client.activationDate, "dd/MM/YYYY")}}"" ==> "enroll on 09/08/2013.0" - kind of thing?
That convert.mifosDate helper could be something like your already existing org.mifosplatform.template.domain.TemplateFunctions.now()... so we'd have a new org.mifosplatform.template.domain.ConvertFunctions util, with something like: public static String mifosDateArray(List<String> mifosDate).
See also "Updating Dates and Numbers" on https://demo.openmf.org/api-docs/apiLive.htm.
BTW, as linked from that page, we should probably use Yoda's DateTimeFormat instead of java.text.SimpleDateFormat.SimpleDateFormat(String), for consistency within Mifos?
|