Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public enum Month
- Object
- Enum<Month>
- Month
ImplementsComparable<Month>, TemporalAccessor
The twelve months of the ISO calendar.
Enum constants
JANUARY | January, month 1. |
FEBRUARY | February, month 2. |
MARCH | March, month 3. |
APRIL | April, month 4. |
MAY | May, month 5. |
JUNE | June, month 6. |
JULY | July, month 7. |
AUGUST | August, month 8. |
SEPTEMBER | September, month 9. |
OCTOBER | October, month 10. |
NOVEMBER | November, month 11. |
DECEMBER | December, month 12. |
Methods
public static Month[] values() | |
public static Month valueOf(String name) | |
public static Month of(int month) | The month numbered month, 1 for January to 12 for December. |
public int getValue() | 1 for January to 12 for December. |
public Month plus(long months) | The month months later, around the year. |
public Month minus(long months) | The month months earlier, around the year. |
public int length(boolean leapYear) | The number of days of this month in a leap year or another. |
public int minLength() | The fewest days this month can have. |
public int maxLength() | The most days this month can have. |
public int firstDayOfYear(boolean leapYear) | The day of the year this month starts on, 1 for January. |
public Month firstMonthOfQuarter() | The first month of the quarter this month is in. |
Inherited methods
Enum constant details
JANUARY
JANUARYJanuary, month 1.
FEBRUARY
FEBRUARYFebruary, month 2.
MARCH
MARCHMarch, month 3.
APRIL
APRILApril, month 4.
MAY
MAYMay, month 5.
JUNE
JUNEJune, month 6.
JULY
JULYJuly, month 7.
AUGUST
AUGUSTAugust, month 8.
SEPTEMBER
SEPTEMBERSeptember, month 9.
OCTOBER
OCTOBEROctober, month 10.
NOVEMBER
NOVEMBERNovember, month 11.
DECEMBER
DECEMBERDecember, month 12.
Method details
values
public static Month[] values()valueOf
public static Month valueOf(String name)of
public static Month of(int month)The month numbered
month, 1 for January to 12 for December.getValue
public int getValue()1 for January to 12 for December.
plus
public Month plus(long months)The month
months later, around the year.minus
public Month minus(long months)The month
months earlier, around the year.length
public int length(boolean leapYear)The number of days of this month in a leap year or another.
minLength
public int minLength()The fewest days this month can have.
maxLength
public int maxLength()The most days this month can have.
firstDayOfYear
public int firstDayOfYear(boolean leapYear)The day of the year this month starts on, 1 for January.
firstMonthOfQuarter
public Month firstMonthOfQuarter()The first month of the quarter this month is in.