DayOfWeek.GetDisplayName(TextStyle, Locale) Method

Definition

Gets the textual representation, such as 'Mon' or 'Friday'.

[Android.Runtime.Register("getDisplayName", "(Ljava/time/format/TextStyle;Ljava/util/Locale;)Ljava/lang/String;", "", ApiSince=26)]
public 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;", "", ApiSince=26)>]
member 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 day-of-week, not null

Attributes

Remarks

Gets the textual representation, such as 'Mon' or 'Friday'.

This returns the textual name used to identify the day-of-week, 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 #getValue() numeric value is returned.

Java documentation for java.time.DayOfWeek.getDisplayName(java.time.format.TextStyle, 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