The views docs have an example of number format configuration:
public class FreeMarkerConfig extends AbstractFreeMarkerConfig {
@Override
public void init() {
//this is to override a strange FreeMarker default processing of numbers
getConfiguration().setNumberFormat("0.##");
}
}
What is the right syntax to use for a custom date, time format in the below code:
getConfiguration().setDateFormat("what comes here ?????");
Thank you.
The method
getConfiguration()
simply returns an instance offreemarker.template.Configuration
, which gives you a direct access to configure FreeMarker any way you want. Please, refer to FreeMarker Configuration docs to see what is possible.