Class DateFormatterDefault
java.lang.Object
org.spincast.plugins.dateformatter.DateFormatterDefault
- All Implemented Interfaces:
DateFormatter
-
Constructor Summary
ConstructorDescriptionDateFormatterDefault
(Instant instant, LocaleResolver localeResolver, TimeZoneResolver timeZoneResolver) DateFormatterDefault
(Date date, LocaleResolver localeResolver, TimeZoneResolver timeZoneResolver) -
Method Summary
Modifier and TypeMethodDescriptiondatePattern
(String datePatternCustom) The custom pattern to use for the *date* part (without time).datePattern
(DatePattern datePattern) The pattern to use for the *date* part (without time).format()
Format!protected String
The locale to use.Which part(s) of ther date to format and output?The separator string to use between the date part and the time part.timePattern
(String timePatternCustom) The custom pattern to use for the *time* part (without the date).timePattern
(DatePattern timePattern) The pattern to use for the *time* part (without the date).The timeZone to use.
-
Constructor Details
-
DateFormatterDefault
public DateFormatterDefault(Instant instant, LocaleResolver localeResolver, TimeZoneResolver timeZoneResolver) -
DateFormatterDefault
public DateFormatterDefault(Date date, LocaleResolver localeResolver, TimeZoneResolver timeZoneResolver)
-
-
Method Details
-
locale
Description copied from interface:DateFormatter
The locale to use. Defaults to the one provided by theLocaleResolver
.- Specified by:
locale
in interfaceDateFormatter
-
timeZone
Description copied from interface:DateFormatter
The timeZone to use.- Specified by:
timeZone
in interfaceDateFormatter
-
parts
Description copied from interface:DateFormatter
Which part(s) of ther date to format and output?- Specified by:
parts
in interfaceDateFormatter
-
datePattern
Description copied from interface:DateFormatter
The pattern to use for the *date* part (without time).- Specified by:
datePattern
in interfaceDateFormatter
-
datePattern
Description copied from interface:DateFormatter
The custom pattern to use for the *date* part (without time).- Specified by:
datePattern
in interfaceDateFormatter
-
timePattern
Description copied from interface:DateFormatter
The pattern to use for the *time* part (without the date).- Specified by:
timePattern
in interfaceDateFormatter
-
timePattern
Description copied from interface:DateFormatter
The custom pattern to use for the *time* part (without the date).- Specified by:
timePattern
in interfaceDateFormatter
-
separator
Description copied from interface:DateFormatter
The separator string to use between the date part and the time part. Defaults to " - ".- Specified by:
separator
in interfaceDateFormatter
-
getDefaultSeparator
-
format
Description copied from interface:DateFormatter
Format!- Specified by:
format
in interfaceDateFormatter
-