NOTE: This class only supports the two fields listed above. It is impossible to query any other fields, such as dayOfWeek or centuryOfEra.
Calculations on YearMonth are performed using a {@link Chronology}. This chronology is set to be in the UTC time zone for all calculations.
One use case for this class is to store a credit card expiry date, as that only references the year and month. This class can be used as the gYearMonth type in XML Schema.
Each individual field can be queried in two ways:
getMonthOfYear()
monthOfYear().get()
monthOfYear().get()
monthOfYear().getAsText()
monthOfYear().getAsShortText()
monthOfYear().getMaximumValue()
monthOfYear().addToCopy()
monthOfYear().setCopy()
YearMonth is thread-safe and immutable, provided that the Chronology is as well. All standard Chronology classes supplied are thread-safe and immutable. @author Stephen Colebourne @since 2.0
|
|
|
|
|
|
|
|
|
|