Interface DateFormatter
- All Known Implementing Classes:
DateTimeFormatterAdapter
,SimpleDateFormatAdapter
public interface DateFormatter
Allows defines a wrapper around different formatting APIs, like old SimpleDateFormat
and new DateTimeFormatter introduced in Java 8 Date/Time API
New instance will be injected using StrutsConstants.STRUTS_DATE_FORMATTER
-
Method Summary
Modifier and TypeMethodDescriptionformat
(TemporalAccessor temporal, String format) Formats provided temporal with the given format
-
Method Details
-
format
Formats provided temporal with the given format- Parameters:
temporal
- Java 8TemporalAccessor
format
- implementation specific format- Returns:
- a string representation of the formatted `temporal`
-