Share via


DateFormat.GetInstance Method

Definition

Overloads

GetInstance(Calendar, Locale)

Returns a date/time formatter that uses the SHORT style for both the date and the time.

GetInstance(Calendar)

Returns a default date/time formatter that uses the SHORT style for both the date and the time.

GetInstance(Calendar, ULocale)

Returns a date/time formatter that uses the SHORT style for both the date and the time.

GetInstance(Calendar, Locale)

Returns a date/time formatter that uses the SHORT style for both the date and the time.

[Android.Runtime.Register("getInstance", "(Landroid/icu/util/Calendar;Ljava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetInstance (Android.Icu.Util.Calendar? cal, Java.Util.Locale? locale);
[<Android.Runtime.Register("getInstance", "(Landroid/icu/util/Calendar;Ljava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetInstance : Android.Icu.Util.Calendar * Java.Util.Locale -> Android.Icu.Text.DateFormat

Parameters

cal
Calendar

The calendar system for which a date/time format is desired.

locale
Locale

The locale for which the date/time format is desired.

Returns

Attributes

Remarks

Returns a date/time formatter that uses the SHORT style for both the date and the time.

Java documentation for android.icu.text.DateFormat.getInstance(android.icu.util.Calendar, 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

GetInstance(Calendar)

Returns a default date/time formatter that uses the SHORT style for both the date and the time.

[Android.Runtime.Register("getInstance", "(Landroid/icu/util/Calendar;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetInstance (Android.Icu.Util.Calendar? cal);
[<Android.Runtime.Register("getInstance", "(Landroid/icu/util/Calendar;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetInstance : Android.Icu.Util.Calendar -> Android.Icu.Text.DateFormat

Parameters

cal
Calendar

The calendar system for which a date/time format is desired.

Returns

Attributes

Remarks

Returns a default date/time formatter that uses the SHORT style for both the date and the time.

Java documentation for android.icu.text.DateFormat.getInstance(android.icu.util.Calendar).

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

GetInstance(Calendar, ULocale)

Returns a date/time formatter that uses the SHORT style for both the date and the time.

[Android.Runtime.Register("getInstance", "(Landroid/icu/util/Calendar;Landroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=33)]
public static Android.Icu.Text.DateFormat? GetInstance (Android.Icu.Util.Calendar? cal, Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getInstance", "(Landroid/icu/util/Calendar;Landroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=33)>]
static member GetInstance : Android.Icu.Util.Calendar * Android.Icu.Util.ULocale -> Android.Icu.Text.DateFormat

Parameters

cal
Calendar

The calendar system for which a date/time format is desired.

locale
ULocale

The locale for which the date/time format is desired.

Returns

Attributes

Remarks

Returns a date/time formatter that uses the SHORT style for both the date and the time.

Java documentation for android.icu.text.DateFormat.getInstance(android.icu.util.Calendar, android.icu.util.ULocale).

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