DateFormat.GetDateInstance Method

Definition

Overloads

GetDateInstance(Int32)

Gets the date formatter with the given formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.

GetDateInstance(Int32, Locale)

Gets the date formatter with the given formatting style for the given locale.

GetDateInstance(Int32)

Gets the date formatter with the given formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.

[Android.Runtime.Register("getDateInstance", "(I)Ljava/text/DateFormat;", "")]
public static Java.Text.DateFormat GetDateInstance (int style);
[<Android.Runtime.Register("getDateInstance", "(I)Ljava/text/DateFormat;", "")>]
static member GetDateInstance : int -> Java.Text.DateFormat

Parameters

style
Int32

the given formatting style. For example, SHORT for "M/d/yy" in the US locale.

Returns

a date formatter.

Attributes

Exceptions

if style is not one of SHORT, MEDIUM, LONG, FULL, or DEFAULT.

Remarks

Gets the date formatter with the given formatting style for the default java.util.Locale.Category#FORMAT FORMAT locale.

This is equivalent to calling #getDateInstance(int, Locale) getDateInstance(style, Locale.getDefault(Locale.Category.FORMAT)).

Java documentation for java.text.DateFormat.getDateInstance(int).

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

GetDateInstance(Int32, Locale)

Gets the date formatter with the given formatting style for the given locale.

[Android.Runtime.Register("getDateInstance", "(ILjava/util/Locale;)Ljava/text/DateFormat;", "")]
public static Java.Text.DateFormat GetDateInstance (int style, Java.Util.Locale aLocale);
[<Android.Runtime.Register("getDateInstance", "(ILjava/util/Locale;)Ljava/text/DateFormat;", "")>]
static member GetDateInstance : int * Java.Util.Locale -> Java.Text.DateFormat

Parameters

style
Int32

the given formatting style. For example, SHORT for "M/d/yy" in the US locale.

aLocale
Locale

the given locale.

Returns

a date formatter.

Attributes

Exceptions

if style is not one of SHORT, MEDIUM, LONG, FULL, or DEFAULT.

Remarks

Gets the date formatter with the given formatting style for the given locale.

Java documentation for java.text.DateFormat.getDateInstance(int, java.util.Locale).

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