The built-in type
Month represents months.
It has the following definition:
type Month | January | February | March | April | May | June | July | August | September | October | November | December
toInt : Month -> Int¶
Returns the month value for the given month.
val jan = Month::toInt January // = 1 val aug = Month::toInt August // = 8
fromInt : Int -> Month¶
Month from a month value.
This function is partial and fails if the month value is outside the range
[1 .. 12].
val jan = Month::fromInt 1 // = January val aug = Month::fromInt 9 // = August
firstDayOfMonth : Boolean -> Month -> Int¶
Returns the day-of-year of the 1st of the given month. The boolean argument flags whether the year is a leap year or not.
val firstOfAugustLeapYear = Month::firstDayOfMonth True August // = 214 val firstOfAugustNonLeapYear = Month::firstDayOfMonth False August // = 213