DateTimeFormatter.withLocale

Returns a copy of this formatter with a new locale. !(p) This is used to lookup any part of the formatter needing specific localization, such as the text or localized pattern. !(p) The locale is stored as passed _in, without further processing. If the locale has <a href="../../util/Locale.html#def_locale_extension"> Unicode extensions</a>, they may be used later _in text processing. To set the chronology, time-zone and decimal style from unicode extensions, see {@link #localizedBy localizedBy()}. !(p) This instance is immutable and unaffected by this method call.

@param locale the new locale, not null @return a formatter based on this formatter with the requested locale, not null @see #localizedBy(Locale)

class DateTimeFormatter
withLocale
(
Locale locale
)

Meta