DateFormat.GetTimeInstance Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetTimeInstance(DateFormatStyle) |
Returns the time formatter with the given formatting style
for the default |
GetTimeInstance(DateFormatStyle, ULocale) |
Returns the time formatter with the given formatting style for the given locale. |
GetTimeInstance(DateFormatStyle, Locale) |
Returns the time formatter with the given formatting style for the given locale. |
GetTimeInstance(Calendar, DateFormatStyle) |
Creates a |
GetTimeInstance(Calendar, DateFormatStyle, ULocale) |
Creates a |
GetTimeInstance(Calendar, DateFormatStyle, Locale) |
Creates a |
GetTimeInstance(DateFormatStyle)
Returns the time formatter with the given formatting style
for the default FORMAT
locale.
[Android.Runtime.Register("getTimeInstance", "(I)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetTimeInstance (Android.Icu.Text.DateFormatStyle style);
[<Android.Runtime.Register("getTimeInstance", "(I)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetTimeInstance : Android.Icu.Text.DateFormatStyle -> Android.Icu.Text.DateFormat
Parameters
- style
- DateFormatStyle
the given formatting style. For example, SHORT for "h:mm a" in the US locale. Relative time styles are not currently supported, and behave just like the corresponding non-relative style.
Returns
a time formatter.
- Attributes
Remarks
Returns the time formatter with the given formatting style for the default FORMAT
locale.
Java documentation for android.icu.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(DateFormatStyle, ULocale)
Returns the time formatter with the given formatting style for the given locale.
[Android.Runtime.Register("getTimeInstance", "(ILandroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetTimeInstance (Android.Icu.Text.DateFormatStyle style, Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getTimeInstance", "(ILandroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetTimeInstance : Android.Icu.Text.DateFormatStyle * Android.Icu.Util.ULocale -> Android.Icu.Text.DateFormat
Parameters
- style
- DateFormatStyle
the given formatting style. For example, SHORT for "h:mm a" in the US locale. Relative time styles are not currently supported, and behave just like the corresponding non-relative style.
- locale
- ULocale
the given ulocale.
Returns
a time formatter.
- Attributes
Remarks
Returns the time formatter with the given formatting style for the given locale.
Java documentation for android.icu.text.DateFormat.getTimeInstance(int, 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
GetTimeInstance(DateFormatStyle, Locale)
Returns the time formatter with the given formatting style for the given locale.
[Android.Runtime.Register("getTimeInstance", "(ILjava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetTimeInstance (Android.Icu.Text.DateFormatStyle style, Java.Util.Locale? aLocale);
[<Android.Runtime.Register("getTimeInstance", "(ILjava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetTimeInstance : Android.Icu.Text.DateFormatStyle * Java.Util.Locale -> Android.Icu.Text.DateFormat
Parameters
- style
- DateFormatStyle
the given formatting style. For example, SHORT for "h:mm a" in the US locale. Relative time styles are not currently supported, and behave just like the corresponding non-relative style.
- aLocale
- Locale
the given locale.
Returns
a time formatter.
- Attributes
Remarks
Returns the time formatter with the given formatting style for the given locale.
Java documentation for android.icu.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
GetTimeInstance(Calendar, DateFormatStyle)
Creates a DateFormat
object that can be used to format times in
the calendar system specified by cal
.
[Android.Runtime.Register("getTimeInstance", "(Landroid/icu/util/Calendar;I)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetTimeInstance (Android.Icu.Util.Calendar? cal, Android.Icu.Text.DateFormatStyle timeStyle);
[<Android.Runtime.Register("getTimeInstance", "(Landroid/icu/util/Calendar;I)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetTimeInstance : Android.Icu.Util.Calendar * Android.Icu.Text.DateFormatStyle -> Android.Icu.Text.DateFormat
Parameters
- cal
- Calendar
The calendar system for which a time format is desired.
- timeStyle
- DateFormatStyle
The type of time format desired. This can be
DateFormat#SHORT
, DateFormat#MEDIUM
,
etc.
Returns
- Attributes
Remarks
Creates a DateFormat
object that can be used to format times in the calendar system specified by cal
.
Java documentation for android.icu.text.DateFormat.getTimeInstance(android.icu.util.Calendar, 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(Calendar, DateFormatStyle, ULocale)
Creates a DateFormat
object that can be used to format times in
the calendar system specified by cal
.
[Android.Runtime.Register("getTimeInstance", "(Landroid/icu/util/Calendar;ILandroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetTimeInstance (Android.Icu.Util.Calendar? cal, Android.Icu.Text.DateFormatStyle timeStyle, Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getTimeInstance", "(Landroid/icu/util/Calendar;ILandroid/icu/util/ULocale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetTimeInstance : Android.Icu.Util.Calendar * Android.Icu.Text.DateFormatStyle * Android.Icu.Util.ULocale -> Android.Icu.Text.DateFormat
Parameters
- cal
- Calendar
The calendar system for which a time format is desired.
- timeStyle
- DateFormatStyle
The type of time format desired. This can be
DateFormat#SHORT
, DateFormat#MEDIUM
,
etc.
- locale
- ULocale
The locale for which the time format is desired.
Returns
- Attributes
Remarks
Creates a DateFormat
object that can be used to format times in the calendar system specified by cal
.
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(Calendar, DateFormatStyle, Locale)
Creates a DateFormat
object that can be used to format times in
the calendar system specified by cal
.
[Android.Runtime.Register("getTimeInstance", "(Landroid/icu/util/Calendar;ILjava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)]
public static Android.Icu.Text.DateFormat? GetTimeInstance (Android.Icu.Util.Calendar? cal, Android.Icu.Text.DateFormatStyle timeStyle, Java.Util.Locale? locale);
[<Android.Runtime.Register("getTimeInstance", "(Landroid/icu/util/Calendar;ILjava/util/Locale;)Landroid/icu/text/DateFormat;", "", ApiSince=24)>]
static member GetTimeInstance : Android.Icu.Util.Calendar * Android.Icu.Text.DateFormatStyle * Java.Util.Locale -> Android.Icu.Text.DateFormat
Parameters
- cal
- Calendar
The calendar system for which a time format is desired.
- timeStyle
- DateFormatStyle
The type of time format desired. This can be
DateFormat#SHORT
, DateFormat#MEDIUM
,
etc.
- locale
- Locale
The locale for which the time format is desired.
Returns
- Attributes
Remarks
Creates a DateFormat
object that can be used to format times in the calendar system specified by cal
.
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.