Package Summary  Overview Summary

method:getLocalizedDateTimePattern(java.time.format.FormatStyle,java.time.format.FormatStyle,java.time.chrono.Chronology,java.util.Locale) [CHANGED]

  • getLocalizedDateTimePattern

    public static String getLocalizedDateTimePattern​(FormatStyle dateStyle,
                                                     FormatStyle timeStyle,
                                                     Chronology chrono,
                                                     Locale locale)
    Gets the formatting pattern for date and time styles for a locale and chronology. The locale and chronology are used to lookup the locale specific format for the requested dateStyle and/or timeStyle.

    If the locale contains the "rg" (region override) Unicode extensions , the formatting pattern is overridden with the one appropriate for the region.

    Parameters:
    dateStyle - the FormatStyle for the date, null for time-only pattern
    timeStyle - the FormatStyle for the time, null for date-only pattern
    chrono - the Chronology, non-null
    locale - the locale, non-null
    Returns:
    the locale and Chronology specific formatting pattern
    Throws:
    IllegalArgumentException - if both dateStyle and timeStyle are null
  • getLocalizedDateTimePattern

    public static String getLocalizedDateTimePattern​(FormatStyle dateStyle,
                                                     FormatStyle timeStyle,
                                                     Chronology chrono,
                                                     Locale locale)
    Gets the formatting pattern for date and time styles for a locale and chronology. The locale and chronology are used to lookup the locale specific format for the requested dateStyle and/or timeStyle.
    Parameters:
    dateStyle - the FormatStyle for the date, null for time-only pattern
    timeStyle - the FormatStyle for the time, null for date-only pattern
    chrono - the Chronology, non-null
    locale - the locale, non-null
    Returns:
    the locale and Chronology specific formatting pattern
    Throws:
    IllegalArgumentException - if both dateStyle and timeStyle are null
  • getLocalizedDateTimePattern

    public static String getLocalizedDateTimePattern​(FormatStyle dateStyle,
                                                     FormatStyle timeStyle,
                                                     Chronology chrono,
                                                     Locale locale)
    Gets the formatting pattern for date and time styles for a locale and chronology. The locale and chronology are used to lookup the locale specific format for the requested dateStyle and/or timeStyle.

    If the locale contains the "rg" (region override) Unicode extensions , the formatting pattern is overridden with the one appropriate for the region.

    Parameters:
    dateStyle - the FormatStyle for the date, null for time-only pattern
    timeStyle - the FormatStyle for the time, null for date-only pattern
    chrono - the Chronology, non-null
    locale - the locale, non-null
    Returns:
    the locale and Chronology specific formatting pattern
    Throws:
    IllegalArgumentException - if both dateStyle and timeStyle are null

method:toFormatter() [CHANGED]

  • toFormatter

    public DateTimeFormatter toFormatter()
    Completes this builder by creating the DateTimeFormatter using the default locale.

    This will create a formatter with the default FORMAT locale . Numbers will be printed and parsed using the standard DecimalStyle. The resolver style will be SMART. If the default locale contains "ca" (calendar), "rg" (region override) and/or "tz" (timezone) Unicode extensions , the chronology and/or the zone are overridden. If both "ca" and "rg" are specified, the chronology from the "ca" extension supersedes the implicit one from the "rg" extension.

    Calling this method will end any open optional sections by repeatedly calling optionalEnd() before creating the formatter.

    This builder can still be used after creating the formatter if desired, although the state may have been changed by calls to optionalEnd.

    Returns:
    the created formatter, not null
  • toFormatter

    public DateTimeFormatter toFormatter()
    Completes this builder by creating the DateTimeFormatter using the default locale.

    This will create a formatter with the default FORMAT locale . Numbers will be printed and parsed using the standard DecimalStyle. The resolver style will be SMART. If the default locale contains "ca" (calendar), "rg" (region override) and/or "tz" (timezone) Unicode extensions , the chronology and/or the zone are overridden. If both "ca" and "rg" are specified, the chronology from the "ca" extension supersedes the implicit one from the "rg" extension.

    Calling this method will end any open optional sections by repeatedly calling optionalEnd() before creating the formatter.

    This builder can still be used after creating the formatter if desired, although the state may have been changed by calls to optionalEnd.

    Returns:
    the created formatter, not null
  • toFormatter

    public DateTimeFormatter toFormatter()
    Completes this builder by creating the DateTimeFormatter using the default locale.

    This will create a formatter with the default FORMAT locale . Numbers will be printed and parsed using the standard DecimalStyle. The resolver style will be SMART.

    Calling this method will end any open optional sections by repeatedly calling optionalEnd() before creating the formatter.

    This builder can still be used after creating the formatter if desired, although the state may have been changed by calls to optionalEnd.

    Returns:
    the created formatter, not null

method:toFormatter(java.util.Locale) [CHANGED]

  • toFormatter

    public DateTimeFormatter toFormatter​(Locale locale)
    Completes this builder by creating the DateTimeFormatter using the specified locale.

    This will create a formatter with the specified locale. Numbers will be printed and parsed using the standard DecimalStyle. The resolver style will be SMART. If the specified locale contains "ca" (calendar), "rg" (region override) and/or "tz" (timezone) Unicode extensions , the chronology and/or the zone are overridden. If both "ca" and "rg" are specified, the chronology from the "ca" extension supersedes the implicit one from the "rg" extension.

    Calling this method will end any open optional sections by repeatedly calling optionalEnd() before creating the formatter.

    This builder can still be used after creating the formatter if desired, although the state may have been changed by calls to optionalEnd.

    Parameters:
    locale - the locale to use for formatting, not null
    Returns:
    the created formatter, not null
  • toFormatter

    public DateTimeFormatter toFormatter​(Locale locale)
    Completes this builder by creating the DateTimeFormatter using the specified locale.

    This will create a formatter with the specified locale. Numbers will be printed and parsed using the standard DecimalStyle. The resolver style will be SMART. If the specified locale contains "ca" (calendar), "rg" (region override) and/or "tz" (timezone) Unicode extensions , the chronology and/or the zone are overridden. If both "ca" and "rg" are specified, the chronology from the "ca" extension supersedes the implicit one from the "rg" extension.

    Calling this method will end any open optional sections by repeatedly calling optionalEnd() before creating the formatter.

    This builder can still be used after creating the formatter if desired, although the state may have been changed by calls to optionalEnd.

    Parameters:
    locale - the locale to use for formatting, not null
    Returns:
    the created formatter, not null
  • toFormatter

    public DateTimeFormatter toFormatter​(Locale locale)
    Completes this builder by creating the DateTimeFormatter using the specified locale.

    This will create a formatter with the specified locale. Numbers will be printed and parsed using the standard DecimalStyle. The resolver style will be SMART.

    Calling this method will end any open optional sections by repeatedly calling optionalEnd() before creating the formatter.

    This builder can still be used after creating the formatter if desired, although the state may have been changed by calls to optionalEnd.

    Parameters:
    locale - the locale to use for formatting, not null
    Returns:
    the created formatter, not null