Package it.tidalwave.util
Class LocalizedDateTimeFormatters
java.lang.Object
it.tidalwave.util.LocalizedDateTimeFormatters
A factory class for localized
DateTimeFormatter
s in various flavours, specified by the FormatStyle
.
This class is especially useful for migration to JDK 9+, where the default behaviour of
DateTimeFormatter.ofLocalizedDate/DateTime(...)
has changed.
At the moment only locales for English and Italian are supported.- Since:
- 3.1-ALPHA-4
- Author:
- Fabrizio Giudici
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeFormatter
getDateTimeFormatterFor
(FormatStyle style, Locale locale) Returns a formatter.
-
Constructor Details
-
LocalizedDateTimeFormatters
public LocalizedDateTimeFormatters()
-
-
Method Details
-
getDateTimeFormatterFor
@Nonnull public static DateTimeFormatter getDateTimeFormatterFor(@Nonnull FormatStyle style, @Nonnull Locale locale) Returns a formatter.- Parameters:
style
- the stylelocale
- the locale- Returns:
- the formatter
-