DateTimePatternGenerator.SetAppendItemFormat Method

Definition

An AppendItem format is a pattern used to append a field if there is no good match.

[Android.Runtime.Register("setAppendItemFormat", "(ILjava/lang/String;)V", "GetSetAppendItemFormat_ILjava_lang_String_Handler", ApiSince=24)]
public virtual void SetAppendItemFormat (Android.Icu.Text.DateTimePatternField field, string? value);
[<Android.Runtime.Register("setAppendItemFormat", "(ILjava/lang/String;)V", "GetSetAppendItemFormat_ILjava_lang_String_Handler", ApiSince=24)>]
abstract member SetAppendItemFormat : Android.Icu.Text.DateTimePatternField * string -> unit
override this.SetAppendItemFormat : Android.Icu.Text.DateTimePatternField * string -> unit

Parameters

field
DateTimePatternField

such as ERA

value
String

pattern, such as "{0}, {1}"

Attributes

Remarks

An AppendItem format is a pattern used to append a field if there is no good match. For example, suppose that the input skeleton is "GyyyyMMMd", and there is no matching pattern internally, but there is a pattern matching "yyyyMMMd", say "d-MM-yyyy". Then that pattern is used, plus the G. The way these two are conjoined is by using the AppendItemFormat for G (era). So if that value is, say "{0}, {1}" then the final resulting pattern is "d-MM-yyyy, G".

There are actually three available variables: {0} is the pattern so far, {1} is the element we are adding, and {2} is the name of the element.

This reflects the way that the CLDR data is organized.

Java documentation for android.icu.text.DateTimePatternGenerator.setAppendItemFormat(int, java.lang.String).

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