Initializer |
Month(Integer integer) Parameters:
|
Attributes | |
integer | Source Codeshared Integer integer Ordinal number of the month of year. Where: january = 1 february = 2 … december = 12 |
Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: Enumerable<Other> |
Attributes inherited from: Ordinal<Other> |
Methods | |
add | Source Codeshared Overflow add(Integer numberOfMonths) Adds number of months to this month and returns the result as new month value and number of times the operation overflowed. |
compare | Source Codeshared actual Comparison compare(Month other) Compares ordinal numbers of two instances of Refines Comparable.compare |
firstDayOfYear | Source Codeshared default Integer firstDayOfYear(Boolean leapYear = false) Returns the day of year value for first of this month. Parameters:
|
minusMonths | Source Codeshared Month minusMonths(Integer number) Returns month of year that comes specified number of months before this month. |
neighbour | Source Codeshared actual Month neighbour(Integer offset) returns For example: assert(january.neighbour(0) == january); assert(january.neighbour(1) == february); assert(january.neighbour(-1) == december); Refines Enumerable.neighbour |
numberOfDays | Source Codeshared default Integer numberOfDays(Boolean leapYear = false) Returns number of days in this month. Parameters:
|
offset | Source Codeshared actual default Integer offset(Month other) Returns the offset of the other month compared to this. This will always return positive integer such that given any
two months assert(0 <= a.offset(b) <= 11); Refines Enumerable.offset |
plusMonths | Source Codeshared Month plusMonths(Integer number) Returns month of year that comes specified number of months after this month. |
Inherited Methods |
Methods inherited from: Object |
Methods inherited from: Comparable<Other> |
Methods inherited from: Enumerable<Other> |
Nested Classes | |
Overflow | Source Codeshared Overflow A result of adding or subtracting a month to another amount. |