Fan

 

const final enum

sys::Month

sys::Obj
  sys::Enum
    sys::Month

@simple

Enum for twelve months of the year.

Slots

aprSource

static Month apr := Month.make(3, "apr")

April

augSource

static Month aug := Month.make(7, "aug")

August

decSource

static Month dec := Month.make(11, "dec")

December

decrementSource

Month decrement()

Return the month before this month.

febSource

static Month feb := Month.make(1, "feb")

February

fromStrSource

static Month? fromStr(Str name, Bool checked := true)

Return the Month instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.

incrementSource

Month increment()

Return the month after this month.

janSource

static Month jan := Month.make(0, "jan")

January

julSource

static Month jul := Month.make(6, "jul")

July

junSource

static Month jun := Month.make(5, "jun")

June

localeAbbrSource

Str localeAbbr()

Get the abbreviated name for the current locale. Configured by the sys::<name>Abbr localized property.

localeFullSource

Str localeFull()

Get the full name for the current locale. Configured by the sys::<name>Full localized property.

marSource

static Month mar := Month.make(2, "mar")

March

maySource

static Month may := Month.make(4, "may")

May

novSource

static Month nov := Month.make(10, "nov")

November

numDaysSource

Int numDays(Int year)

Return the number of days in this month for the specified year.

octSource

static Month oct := Month.make(9, "oct")

October

sepSource

static Month sep := Month.make(8, "sep")

September

toLocaleSource

Str toLocale(Str? pattern := null)

Return the month as a localized string according to the specified pattern. The pattern rules are a subset of the DateTime.toLocale:

M      One/two digit month        6, 11
MM     Two digit month            06, 11
MMM    Three letter abbr month    Jun, Nov
MMMM   Full month name            June, November

If pattern is null it defaults to "MMM". Also see localeAbbr and localeFull.

valuesSource

static Month[] values := ...

List of Month values indexed by ordinal