Partager via


TimeZone.GetDisplayName Method

Definition

Overloads

GetDisplayName(ULocale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

GetDisplayName(Locale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

GetDisplayName(Boolean, TimeZoneNameStyle)

Returns a name of this time zone suitable for presentation to the user in the default DISPLAY locale.

GetDisplayName(Boolean, TimeZoneNameStyle, ULocale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

GetDisplayName(Boolean, TimeZoneNameStyle, Locale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

GetDisplayName(ULocale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

[Android.Runtime.Register("getDisplayName", "(Landroid/icu/util/ULocale;)Ljava/lang/String;", "", ApiSince=24)]
public string? GetDisplayName (Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getDisplayName", "(Landroid/icu/util/ULocale;)Ljava/lang/String;", "", ApiSince=24)>]
member this.GetDisplayName : Android.Icu.Util.ULocale -> string

Parameters

locale
ULocale

the ulocale in which to supply the display name.

Returns

the human-readable name of this time zone in the given locale or in the default ulocale if the given ulocale is not recognized.

Attributes

Remarks

Returns a name of this time zone suitable for presentation to the user in the specified locale. This method returns the long name, not including daylight savings. If the display name is not available for the locale, a fallback based on the country, city, or time zone id will be used.

Java documentation for android.icu.util.TimeZone.getDisplayName(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

GetDisplayName(Locale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

[Android.Runtime.Register("getDisplayName", "(Ljava/util/Locale;)Ljava/lang/String;", "", ApiSince=24)]
public string? GetDisplayName (Java.Util.Locale? locale);
[<Android.Runtime.Register("getDisplayName", "(Ljava/util/Locale;)Ljava/lang/String;", "", ApiSince=24)>]
member this.GetDisplayName : Java.Util.Locale -> string

Parameters

locale
Locale

the locale in which to supply the display name.

Returns

the human-readable name of this time zone in the given locale or in the default locale if the given locale is not recognized.

Attributes

Remarks

Returns a name of this time zone suitable for presentation to the user in the specified locale. This method returns the long generic name. If the display name is not available for the locale, a fallback based on the country, city, or time zone id will be used.

Java documentation for android.icu.util.TimeZone.getDisplayName(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

GetDisplayName(Boolean, TimeZoneNameStyle)

Returns a name of this time zone suitable for presentation to the user in the default DISPLAY locale.

[Android.Runtime.Register("getDisplayName", "(ZI)Ljava/lang/String;", "", ApiSince=24)]
public string? GetDisplayName (bool daylight, Android.Icu.Util.TimeZoneNameStyle style);
[<Android.Runtime.Register("getDisplayName", "(ZI)Ljava/lang/String;", "", ApiSince=24)>]
member this.GetDisplayName : bool * Android.Icu.Util.TimeZoneNameStyle -> string

Parameters

daylight
Boolean

if true, return the daylight savings name.

style
TimeZoneNameStyle

the output style of the display name. Valid styles are SHORT, LONG, SHORT_GENERIC, LONG_GENERIC, SHORT_GMT, LONG_GMT, SHORT_COMMONLY_USED or GENERIC_LOCATION.

Returns

the human-readable name of this time zone in the default locale.

Attributes

Remarks

Returns a name of this time zone suitable for presentation to the user in the default DISPLAY locale. If the display name is not available for the locale, then this method returns a string in the localized GMT offset format such as GMT[+-]HH:mm.

Java documentation for android.icu.util.TimeZone.getDisplayName(boolean, 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

GetDisplayName(Boolean, TimeZoneNameStyle, ULocale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

[Android.Runtime.Register("getDisplayName", "(ZILandroid/icu/util/ULocale;)Ljava/lang/String;", "GetGetDisplayName_ZILandroid_icu_util_ULocale_Handler", ApiSince=24)]
public virtual string? GetDisplayName (bool daylight, Android.Icu.Util.TimeZoneNameStyle style, Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getDisplayName", "(ZILandroid/icu/util/ULocale;)Ljava/lang/String;", "GetGetDisplayName_ZILandroid_icu_util_ULocale_Handler", ApiSince=24)>]
abstract member GetDisplayName : bool * Android.Icu.Util.TimeZoneNameStyle * Android.Icu.Util.ULocale -> string
override this.GetDisplayName : bool * Android.Icu.Util.TimeZoneNameStyle * Android.Icu.Util.ULocale -> string

Parameters

daylight
Boolean

if true, return the daylight savings name.

style
TimeZoneNameStyle

the output style of the display name. Valid styles are SHORT, LONG, SHORT_GENERIC, LONG_GENERIC, SHORT_GMT, LONG_GMT, SHORT_COMMONLY_USED or GENERIC_LOCATION.

locale
ULocale

the locale in which to supply the display name.

Returns

the human-readable name of this time zone in the given locale or in the default locale if the given locale is not recognized.

Attributes

Remarks

Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the localized GMT offset format such as GMT[+-]HH:mm.

Java documentation for android.icu.util.TimeZone.getDisplayName(boolean, 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

GetDisplayName(Boolean, TimeZoneNameStyle, Locale)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

[Android.Runtime.Register("getDisplayName", "(ZILjava/util/Locale;)Ljava/lang/String;", "GetGetDisplayName_ZILjava_util_Locale_Handler", ApiSince=24)]
public virtual string? GetDisplayName (bool daylight, Android.Icu.Util.TimeZoneNameStyle style, Java.Util.Locale? locale);
[<Android.Runtime.Register("getDisplayName", "(ZILjava/util/Locale;)Ljava/lang/String;", "GetGetDisplayName_ZILjava_util_Locale_Handler", ApiSince=24)>]
abstract member GetDisplayName : bool * Android.Icu.Util.TimeZoneNameStyle * Java.Util.Locale -> string
override this.GetDisplayName : bool * Android.Icu.Util.TimeZoneNameStyle * Java.Util.Locale -> string

Parameters

daylight
Boolean

if true, return the daylight savings name.

style
TimeZoneNameStyle

the output style of the display name. Valid styles are SHORT, LONG, SHORT_GENERIC, LONG_GENERIC, SHORT_GMT, LONG_GMT, SHORT_COMMONLY_USED or GENERIC_LOCATION.

locale
Locale

the locale in which to supply the display name.

Returns

the human-readable name of this time zone in the given locale or in the default locale if the given locale is not recognized.

Attributes

Remarks

Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the localized GMT offset format such as GMT[+-]HH:mm.

Java documentation for android.icu.util.TimeZone.getDisplayName(boolean, 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