次の方法で共有


DateFormat.GetDateTimeInstance Method

Definition

Overloads

GetDateTimeInstance(Int32, Int32)

Gets the date/time formatter with the given date and time formatting styles for the default java.util.Locale.Category#FORMAT FORMAT locale.

GetDateTimeInstance(Int32, Int32, Locale)

Gets the date/time formatter with the given formatting styles for the given locale.

GetDateTimeInstance(Int32, Int32)

Gets the date/time formatter with the given date and time formatting styles for the default java.util.Locale.Category#FORMAT FORMAT locale.

[Android.Runtime.Register("getDateTimeInstance", "(II)Ljava/text/DateFormat;", "")]
public static Java.Text.DateFormat GetDateTimeInstance (int dateStyle, int timeStyle);
[<Android.Runtime.Register("getDateTimeInstance", "(II)Ljava/text/DateFormat;", "")>]
static member GetDateTimeInstance : int * int -> Java.Text.DateFormat

Parameters

dateStyle
Int32

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

timeStyle
Int32

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

Returns

a date/time formatter.

Attributes

Exceptions

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

Remarks

Gets the date/time formatter with the given date and time formatting styles for the default java.util.Locale.Category#FORMAT FORMAT locale.

This is equivalent to calling #getDateTimeInstance(int, int, Locale) getDateTimeInstance(dateStyle, timeStyle, Locale.getDefault(Locale.Category.FORMAT)).

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

GetDateTimeInstance(Int32, Int32, Locale)

Gets the date/time formatter with the given formatting styles for the given locale.

[Android.Runtime.Register("getDateTimeInstance", "(IILjava/util/Locale;)Ljava/text/DateFormat;", "")]
public static Java.Text.DateFormat GetDateTimeInstance (int dateStyle, int timeStyle, Java.Util.Locale aLocale);
[<Android.Runtime.Register("getDateTimeInstance", "(IILjava/util/Locale;)Ljava/text/DateFormat;", "")>]
static member GetDateTimeInstance : int * int * Java.Util.Locale -> Java.Text.DateFormat

Parameters

dateStyle
Int32

the given date formatting style.

timeStyle
Int32

the given time formatting style.

aLocale
Locale

the given locale.

Returns

a date/time formatter.

Attributes

Exceptions

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

Remarks

Gets the date/time formatter with the given formatting styles for the given locale.

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