Dil

DateTimeFormatterBuilder.AppendLocalized Method

Definition

Overloads

Name Description
AppendLocalized(String)

Appends a localized pattern to the formatter using the requested template.

AppendLocalized(FormatStyle, FormatStyle)

Appends a localized date-time pattern to the formatter.

AppendLocalized(String)

Appends a localized pattern to the formatter using the requested template.

[Android.Runtime.Register("appendLocalized", "(Ljava/lang/String;)Ljava/time/format/DateTimeFormatterBuilder;", "", ApiSince=37)]
public Java.Time.Format.DateTimeFormatterBuilder AppendLocalized(string requestedTemplate);
[<Android.Runtime.Register("appendLocalized", "(Ljava/lang/String;)Ljava/time/format/DateTimeFormatterBuilder;", "", ApiSince=37)>]
member this.AppendLocalized : string -> Java.Time.Format.DateTimeFormatterBuilder

Parameters

requestedTemplate
String

the requested template to use, not null

Returns

this, for chaining, not null

Attributes

Remarks

Appends a localized pattern to the formatter using the requested template. This appends a localized section to the builder, suitable for outputting a date, time or date-time combination. The format of the localized section is lazily looked up based on three items: the requestedTemplate specified to this method; the Locale of the DateTimeFormatter; the Chronology of the DateTimeFormatter unless overridden. During formatting, the chronology is obtained from the temporal object being formatted, which may have been overridden by DateTimeFormatter.withChronology(Chronology). During parsing, if a chronology has already been parsed, then it is used. Otherwise the default from DateTimeFormatter.withChronology(Chronology) is used, with IsoChronology as the fallback.

"G{0,5}" +        // Era
"y*" +            // Year
"Q{0,5}" +        // Quarter
"M{0,5}" +        // Month
"w*" +            // Week of Week Based Year
"E{0,5}" +        // Day of Week
"d{0,2}" +        // Day of Month
"B{0,5}" +        // Period/AmPm of Day
"[hHjC]{0,2}" +   // Hour of Day/AmPm (refer to LDML for 'j' and 'C')
"m{0,2}" +        // Minute of Hour
"s{0,2}" +        // Second of Minute
"[vz]{0,4}"       // Zone

Java reference for java.time.format.DateTimeFormatterBuilder.appendLocalized.

Applies to

AppendLocalized(FormatStyle, FormatStyle)

Appends a localized date-time pattern to the formatter.

[Android.Runtime.Register("appendLocalized", "(Ljava/time/format/FormatStyle;Ljava/time/format/FormatStyle;)Ljava/time/format/DateTimeFormatterBuilder;", "", ApiSince=26)]
public Java.Time.Format.DateTimeFormatterBuilder? AppendLocalized(Java.Time.Format.FormatStyle? dateStyle, Java.Time.Format.FormatStyle? timeStyle);
[<Android.Runtime.Register("appendLocalized", "(Ljava/time/format/FormatStyle;Ljava/time/format/FormatStyle;)Ljava/time/format/DateTimeFormatterBuilder;", "", ApiSince=26)>]
member this.AppendLocalized : Java.Time.Format.FormatStyle * Java.Time.Format.FormatStyle -> Java.Time.Format.DateTimeFormatterBuilder

Parameters

dateStyle
FormatStyle

the date style to use, null means no date required

timeStyle
FormatStyle

the time style to use, null means no time required

Returns

this, for chaining, not null

Attributes

Remarks

Java documentation for java.time.format.DateTimeFormatterBuilder.appendLocalized(java.time.format.FormatStyle, java.time.format.FormatStyle).

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.

Applies to