Sdílet prostřednictvím


DateFormat.GetPatternInstance Method

Definition

Overloads

GetPatternInstance(Calendar, String, Locale)

<strong>[icu]</strong> Creates a DateFormat object that can be used to format dates and times in the calendar system specified by cal.

GetPatternInstance(Calendar, String, ULocale)

<strong>[icu]</strong> Creates a DateFormat object that can be used to format dates and times in the calendar system specified by cal.

GetPatternInstance(String)

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the default locale.

GetPatternInstance(String, ULocale)

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the given locale.

GetPatternInstance(String, Locale)

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the given locale.

GetPatternInstance(Calendar, String, Locale)

<strong>[icu]</strong> Creates a DateFormat object that can be used to format dates and times in the calendar system specified by cal.

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

Parameters

cal
Calendar

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

skeleton
String

The skeleton that selects the fields to be formatted. (Uses the DateTimePatternGenerator.) This can be DateFormat#ABBR_MONTH, DateFormat#MONTH_WEEKDAY_DAY, etc.

locale
Locale

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

Returns

Attributes

Remarks

<strong>[icu]</strong> Creates a DateFormat object that can be used to format dates and times in the calendar system specified by cal. The getInstanceForSkeleton methods are preferred over the getPatternInstance methods.

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

GetPatternInstance(Calendar, String, ULocale)

<strong>[icu]</strong> Creates a DateFormat object that can be used to format dates and times in the calendar system specified by cal.

[Android.Runtime.Register("getPatternInstance", "(Landroid/icu/util/Calendar;Ljava/lang/String;Landroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetPatternInstance (Android.Icu.Util.Calendar? cal, string? skeleton, Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getPatternInstance", "(Landroid/icu/util/Calendar;Ljava/lang/String;Landroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetPatternInstance : Android.Icu.Util.Calendar * string * Android.Icu.Util.ULocale -> Android.Icu.Text.DateFormat

Parameters

cal
Calendar

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

skeleton
String

The skeleton that selects the fields to be formatted. (Uses the DateTimePatternGenerator.) This can be DateFormat#ABBR_MONTH, DateFormat#MONTH_WEEKDAY_DAY, etc.

locale
ULocale

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

Returns

Attributes

Remarks

<strong>[icu]</strong> Creates a DateFormat object that can be used to format dates and times in the calendar system specified by cal. The getInstanceForSkeleton methods are preferred over the getPatternInstance methods.

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

GetPatternInstance(String)

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the default locale.

[Android.Runtime.Register("getPatternInstance", "(Ljava/lang/String;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetPatternInstance (string? skeleton);
[<Android.Runtime.Register("getPatternInstance", "(Ljava/lang/String;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetPatternInstance : string -> Android.Icu.Text.DateFormat

Parameters

skeleton
String

The skeleton that selects the fields to be formatted. (Uses the DateTimePatternGenerator.) This can be DateFormat#ABBR_MONTH, DateFormat#MONTH_WEEKDAY_DAY, etc.

Returns

Attributes

Remarks

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the default locale. The getInstanceForSkeleton methods are preferred over the getPatternInstance methods.

Java documentation for android.icu.text.DateFormat.getPatternInstance(java.lang.String).

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

GetPatternInstance(String, ULocale)

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the given locale.

[Android.Runtime.Register("getPatternInstance", "(Ljava/lang/String;Landroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetPatternInstance (string? skeleton, Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getPatternInstance", "(Ljava/lang/String;Landroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetPatternInstance : string * Android.Icu.Util.ULocale -> Android.Icu.Text.DateFormat

Parameters

skeleton
String

The skeleton that selects the fields to be formatted. (Uses the DateTimePatternGenerator.) This can be DateFormat#ABBR_MONTH, DateFormat#MONTH_WEEKDAY_DAY, etc.

locale
ULocale

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

Returns

Attributes

Remarks

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the given locale. The getInstanceForSkeleton methods are preferred over the getPatternInstance methods.

Java documentation for android.icu.text.DateFormat.getPatternInstance(java.lang.String, 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

GetPatternInstance(String, Locale)

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the given locale.

[Android.Runtime.Register("getPatternInstance", "(Ljava/lang/String;Ljava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetPatternInstance (string? skeleton, Java.Util.Locale? locale);
[<Android.Runtime.Register("getPatternInstance", "(Ljava/lang/String;Ljava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetPatternInstance : string * Java.Util.Locale -> Android.Icu.Text.DateFormat

Parameters

skeleton
String

The skeleton that selects the fields to be formatted. (Uses the DateTimePatternGenerator.) This can be DateFormat#ABBR_MONTH, DateFormat#MONTH_WEEKDAY_DAY, etc.

locale
Locale

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

Returns

Attributes

Remarks

<strong>[icu]</strong> Returns a DateFormat object that can be used to format dates and times in the given locale. The getInstanceForSkeleton methods are preferred over the getPatternInstance methods.

Java documentation for android.icu.text.DateFormat.getPatternInstance(java.lang.String, 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