DateTimeFormatter.OfLocalizedDate(FormatStyle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a locale specific date format for the ISO chronology.
[Android.Runtime.Register("ofLocalizedDate", "(Ljava/time/format/FormatStyle;)Ljava/time/format/DateTimeFormatter;", "", ApiSince=26)]
public static Java.Time.Format.DateTimeFormatter? OfLocalizedDate (Java.Time.Format.FormatStyle? dateStyle);
[<Android.Runtime.Register("ofLocalizedDate", "(Ljava/time/format/FormatStyle;)Ljava/time/format/DateTimeFormatter;", "", ApiSince=26)>]
static member OfLocalizedDate : Java.Time.Format.FormatStyle -> Java.Time.Format.DateTimeFormatter
Parameters
- dateStyle
- FormatStyle
the formatter style to obtain, not null
Returns
the date formatter, not null
- Attributes
Remarks
Returns a locale specific date format for the ISO chronology.
This returns a formatter that will format or parse a date. The exact format pattern used varies by locale.
The locale is determined from the formatter. The formatter returned directly by this method will use the Locale#getDefault(Locale.Category) default FORMAT locale
. The locale can be controlled using DateTimeFormatter#withLocale(Locale) withLocale(Locale)
on the result of this method.
Note that the localized pattern is looked up lazily. This DateTimeFormatter
holds the style required and the locale, looking up the pattern required on demand.
The returned formatter has a chronology of ISO set to ensure dates in other calendar systems are correctly converted. It has no override zone and uses the ResolverStyle#SMART SMART
resolver style.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.