Class LocalizedDateTimeFormatters


  • public final class LocalizedDateTimeFormatters
    extends java.lang.Object
    A factory class for localized DateTimeFormatters 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
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.time.format.DateTimeFormatter getDateTimeFormatterFor​(java.time.format.FormatStyle style, java.util.Locale locale)
      Returns a formatter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LocalizedDateTimeFormatters

        public LocalizedDateTimeFormatters()
    • Method Detail

      • getDateTimeFormatterFor

        @Nonnull
        public static java.time.format.DateTimeFormatter getDateTimeFormatterFor​(@Nonnull
                                                                                 java.time.format.FormatStyle style,
                                                                                 @Nonnull
                                                                                 java.util.Locale locale)
        Returns a formatter.
        Parameters:
        style - the style
        locale - the locale
        Returns:
        the formatter