0

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.

4

1 回答 1

1

该方法getConfiguration()只返回一个 的实例freemarker.template.Configuration,它使您可以直接访问以任何方式配置 FreeMarker。请参阅FreeMarker 配置文档以了解可能的情况。

于 2018-09-21T14:48:33.420 回答