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

  1. Object
  2. Enum<Month>
  3. Month

ImplementsComparable<Month>, TemporalAccessor

The twelve months of the ISO calendar.

Enum constants

JANUARYJanuary, month 1.
FEBRUARYFebruary, month 2.
MARCHMarch, month 3.
APRILApril, month 4.
MAYMay, month 5.
JUNEJune, month 6.
JULYJuly, month 7.
AUGUSTAugust, month 8.
SEPTEMBERSeptember, month 9.
OCTOBEROctober, month 10.
NOVEMBERNovember, month 11.
DECEMBERDecember, 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

JANUARY
January, month 1.

FEBRUARY

FEBRUARY
February, month 2.

MARCH

MARCH
March, month 3.

APRIL

APRIL
April, month 4.

MAY

MAY
May, month 5.

JUNE

JUNE
June, month 6.

JULY

JULY
July, month 7.

AUGUST

AUGUST
August, month 8.

SEPTEMBER

SEPTEMBER
September, month 9.

OCTOBER

OCTOBER
October, month 10.

NOVEMBER

NOVEMBER
November, month 11.

DECEMBER

DECEMBER
December, 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.