type
Weekday
src
@Serializable { simple=true }
enum class Weekday : Enum
Enum for seven days of the week.
enum
constructors
fromStr |
Return the Weekday instance for the specified name. |
---|
fields
vals |
List of Weekday values indexed by ordinal |
---|
methods
decrement |
Return the day before this weekday. |
---|---|
increment |
Return the day after this weekday. |
localeAbbr |
Get the abbreviated name for the current locale. |
localeFull |
Get the full name for the current locale. |
localeStartOfWeek |
Get the first day of the week for the current locale. |
localeVals |
Get the days of the week ordered according to the locale's start of the week. |
toLocale |
Return the weekday as a localized string according to the specified pattern. |
Slot Details
decrement
fri
fromStr
increment
localeAbbr
localeFull
localeStartOfWeek
src
static Weekday localeStartOfWeek()
Get the first day of the week for the current locale. For example in the United States, sun
is considered the start of the week. Configured by sys::weekdayStart
localized property. Also see localeVals
.
localeVals
src
static Weekday[] localeVals()
Get the days of the week ordered according to the locale's start of the week. Also see localeStartOfWeek
.
mon
sat
sun
thu
toLocale
src
Str toLocale(Str? pattern := null, Locale locale := Locale.cur())
Return the weekday as a localized string according to the specified pattern. The pattern rules are a subset of the DateTime.toLocale
:
WWW Three letter abbr weekday Tue WWWW Full weekday name Tuesday
If pattern is null it defaults to "WWW". Also see localeAbbr
and localeFull
.