Partager via


SimpleDateFormat.SetNumberFormat(String, NumberFormat) Method

Definition

allow the user to set the NumberFormat for several fields It can be a single field like: "y"(year) or "M"(month) It can be several field combined together: "yMd"(year, month and date) Note: 1 symbol field is enough for multiple symbol fields (so "y" will override "yy", "yyy") If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field)

[Android.Runtime.Register("setNumberFormat", "(Ljava/lang/String;Landroid/icu/text/NumberFormat;)V", "GetSetNumberFormat_Ljava_lang_String_Landroid_icu_text_NumberFormat_Handler", ApiSince=24)]
public virtual void SetNumberFormat (string? fields, Android.Icu.Text.NumberFormat? overrideNF);
[<Android.Runtime.Register("setNumberFormat", "(Ljava/lang/String;Landroid/icu/text/NumberFormat;)V", "GetSetNumberFormat_Ljava_lang_String_Landroid_icu_text_NumberFormat_Handler", ApiSince=24)>]
abstract member SetNumberFormat : string * Android.Icu.Text.NumberFormat -> unit
override this.SetNumberFormat : string * Android.Icu.Text.NumberFormat -> unit

Parameters

fields
String

the fields to override

overrideNF
NumberFormat

the NumbeferFormat used

Attributes

Remarks

allow the user to set the NumberFormat for several fields It can be a single field like: "y"(year) or "M"(month) It can be several field combined together: "yMd"(year, month and date) Note: 1 symbol field is enough for multiple symbol fields (so "y" will override "yy", "yyy") If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field)

Java documentation for android.icu.text.SimpleDateFormat.setNumberFormat(java.lang.String, android.icu.text.NumberFormat).

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