The singleton instance for the month of April with 30 days.
The singleton instance for the month of April with 30 days.
This has the numeric value of 4
.
The singleton instance for the month of August with 31 days.
The singleton instance for the month of August with 31 days.
This has the numeric value of 8
.
The singleton instance for the month of December with 31 days.
The singleton instance for the month of December with 31 days.
This has the numeric value of 12
.
The singleton instance for the month of February with 28 days, or 29 in a leap year.
The singleton instance for the month of February with 28 days, or 29 in a leap year.
This has the numeric value of 2
.
The singleton instance for the month of January with 31 days.
The singleton instance for the month of January with 31 days.
This has the numeric value of 1
.
The singleton instance for the month of July with 31 days.
The singleton instance for the month of July with 31 days.
This has the numeric value of 7
.
The singleton instance for the month of June with 30 days.
The singleton instance for the month of June with 30 days.
This has the numeric value of 6
.
The singleton instance for the month of March with 31 days.
The singleton instance for the month of March with 31 days.
This has the numeric value of 3
.
The singleton instance for the month of May with 31 days.
The singleton instance for the month of May with 31 days.
This has the numeric value of 5
.
The singleton instance for the month of November with 30 days.
The singleton instance for the month of November with 30 days.
This has the numeric value of 11
.
The singleton instance for the month of October with 31 days.
The singleton instance for the month of October with 31 days.
This has the numeric value of 10
.
The singleton instance for the month of September with 30 days.
The singleton instance for the month of September with 30 days.
This has the numeric value of 9
.
Obtains an instance of Month
from a temporal object.
Obtains an instance of Month
from a temporal object.
A TemporalAccessor
represents some form of date and time information.
This factory converts the arbitrary temporal object to an instance of Month
.
The conversion extracts the MONTH_OF_YEAR
field.
The extraction is only permitted if the temporal object has an ISO
chronology, or can be converted to a LocalDate
.
This method matches the signature of the functional interface TemporalQuery
allowing it to be used in queries via method reference, Month::from
.
the temporal object to convert, not null
the month-of-year, not null
DateTimeException
if unable to convert to a { @code Month}
Obtains an instance of Month
from an int
value.
Obtains an instance of Month
from an int
value.
Month
is an enum representing the 12 months of the year.
This factory allows the enum to be obtained from the int
value.
The int
value follows the ISO-8601 standard, from 1 (January) to 12 (December).
the month-of-year to represent, from 1 (January) to 12 (December)
the month-of-year, not null
DateTimeException
if the month-of-year is invalid
A month-of-year, such as 'July'.
Month
is an enum representing the 12 months of the year - January, February, March, April, May, June, July, August, September, October, November and December.In addition to the textual enum name, each month-of-year has an
int
value. Theint
value follows normal usage and the ISO-8601 standard, from 1 (January) to 12 (December). It is recommended that applications use the enum rather than theint
value to ensure code clarity.Do not use
ordinal()
to obtain the numeric representation ofMonth
. UsegetValue()
instead.This enum represents a common concept that is found in many calendar systems. As such, this enum may be used by any calendar system that has the month-of-year concept defined exactly equivalent to the ISO-8601 calendar system.
Specification for implementors
This is an immutable and thread-safe enum.