DateFormat.GetTimeInstance Method

Definition

Overloads

GetTimeInstance(Int32)

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

GetTimeInstance(Int32, Locale)

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

GetTimeInstance(Int32)

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

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

Parameters

style
Int32

the given formatting style. For example, SHORT for "h:mm a" in the US locale.

Returns

a time formatter.

Attributes

Exceptions

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

Remarks

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

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

Java documentation for java.text.DateFormat.getTimeInstance(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

GetTimeInstance(Int32, Locale)

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

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

Parameters

style
Int32

the given formatting style. For example, SHORT for "h:mm a" in the US locale.

aLocale
Locale

the given locale.

Returns

a time formatter.

Attributes

Exceptions

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

Remarks

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

Java documentation for java.text.DateFormat.getTimeInstance(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