ZoneId.GetDisplayName(TextStyle, Locale) 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.
Gets the textual representation of the zone, such as 'British Time' or '+02:00'.
[Android.Runtime.Register("getDisplayName", "(Ljava/time/format/TextStyle;Ljava/util/Locale;)Ljava/lang/String;", "GetGetDisplayName_Ljava_time_format_TextStyle_Ljava_util_Locale_Handler", ApiSince=26)]
public virtual string? GetDisplayName(Java.Time.Format.TextStyle? style, Java.Util.Locale? locale);
[<Android.Runtime.Register("getDisplayName", "(Ljava/time/format/TextStyle;Ljava/util/Locale;)Ljava/lang/String;", "GetGetDisplayName_Ljava_time_format_TextStyle_Ljava_util_Locale_Handler", ApiSince=26)>]
abstract member GetDisplayName : Java.Time.Format.TextStyle * Java.Util.Locale -> string
override this.GetDisplayName : Java.Time.Format.TextStyle * Java.Util.Locale -> string
Parameters
- style
- TextStyle
the length of the text required, not null
- locale
- Locale
the locale to use, not null
Returns
the text value of the zone, not null
- Attributes
Remarks
Gets the textual representation of the zone, such as 'British Time' or '+02:00'. This returns the textual name used to identify the time-zone ID, suitable for presentation to the user. The parameters control the style of the returned text and the locale. If no textual mapping is found then the full ID is returned.
Java reference for java.time.ZoneId.getDisplayName.