Class LocalizedDateTimeFormatters

java.lang.Object
it.tidalwave.util.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
Author:
Fabrizio Giudici
  • 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 style
      locale - the locale
      Returns:
      the formatter