Class DateFilter
java.lang.Object
io.pebbletemplates.pebble.extension.core.DateFilter
- All Implemented Interfaces:
Filter
,NamedArguments
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(Object input, Map<String, Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) private Object
applyDate
(Object dateOrString, PebbleTemplate self, Locale locale, int lineNumber, String format, String existingFormatString, String timeZone) private Object
applyTemporal
(TemporalAccessor input, PebbleTemplate self, Locale locale, int lineNumber, String format, String timeZone) private ZoneId
getZoneId
(TemporalAccessor input, String timeZone)
-
Field Details
-
argumentNames
-
-
Constructor Details
-
DateFilter
public DateFilter()
-
-
Method Details
-
getArgumentNames
- Specified by:
getArgumentNames
in interfaceNamedArguments
-
apply
public Object apply(Object input, Map<String, Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) throws PebbleException- Specified by:
apply
in interfaceFilter
- Throws:
PebbleException
-
applyDate
private Object applyDate(Object dateOrString, PebbleTemplate self, Locale locale, int lineNumber, String format, String existingFormatString, String timeZone) throws PebbleException - Throws:
PebbleException
-
applyTemporal
private Object applyTemporal(TemporalAccessor input, PebbleTemplate self, Locale locale, int lineNumber, String format, String timeZone) throws PebbleException - Throws:
PebbleException
-
getZoneId
-