public class DateTimeFormatHelper extends AbstractTimeFormatHelper<Object,Integer>
DateTimeFormatResolver. The main advantage
lies in the ability to specify custom pattern per tag:
{{formatTime now pattern="DD-MM-yyyy HH:mm"}}
{{formatTime now pattern="HH:mm"}}
...
VALUE_TAG_TYPESHELPER_TAG_TYPESconfiguration| Constructor and Description |
|---|
DateTimeFormatHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
defaultFormat(Object value,
Locale locale,
TimeZone timeZone) |
protected String |
format(Object value,
Integer style,
Locale locale,
TimeZone timeZone) |
protected String |
format(Object value,
String pattern,
Locale locale,
TimeZone timeZone) |
protected Object |
getFormattableObject(Object value,
Locale locale,
TimeZone timeZone,
MustacheTagInfo tagInfo) |
protected Integer |
parseStyle(String style,
MustacheTagInfo tagInfo) |
execute, getSupportedHashKeys, getTimeZone, unknownStyle, valueNotAFormattableObjectgetCurrentLocale, getCurrentLocale, getLocale, initallowedTagTypesgetRequiredHashKeys, numberOfRequiredHashEntries, numberOfRequiredParameters, validateappend, convertAndAppend, convertValue, isSection, isUnescapeVariable, isVariablecheckNotInitialized, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigurationKeys, initprotected String defaultFormat(Object value, Locale locale, TimeZone timeZone)
defaultFormat in class AbstractTimeFormatHelper<Object,Integer>protected String format(Object value, Integer style, Locale locale, TimeZone timeZone)
format in class AbstractTimeFormatHelper<Object,Integer>protected String format(Object value, String pattern, Locale locale, TimeZone timeZone)
format in class AbstractTimeFormatHelper<Object,Integer>protected Object getFormattableObject(Object value, Locale locale, TimeZone timeZone, MustacheTagInfo tagInfo)
getFormattableObject in class AbstractTimeFormatHelper<Object,Integer>protected Integer parseStyle(String style, MustacheTagInfo tagInfo)
parseStyle in class AbstractTimeFormatHelper<Object,Integer>Copyright © 2017. All rights reserved.