Class LocalizedDateTimeFormatters


  • public final class LocalizedDateTimeFormatters
    extends 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
    Version:
    $Id$
    Author:
    Fabrizio Giudici
    • Constructor Detail

      • LocalizedDateTimeFormatters

        public LocalizedDateTimeFormatters()
    • Method Detail

      • getDateTimeFormatterFor

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