LocalDate is an immutable datetime class representing a date without a time zone.
LocalDate implements the {@link ReadablePartial} interface.To do this, the interface methods focus on the key fields - Year, MonthOfYear and DayOfMonth. However, all date fields may in fact be queried.
LocalDate differs from DateMidnight in that this class does not have a time zone and does not represent a single instant in time.
Calculations on LocalDate are performed using a {@link Chronology}. This chronology will be set internally to be in the UTC time zone for all calculations.
Each individual field can be queried in two ways:
getMonthOfYear()
monthOfYear().get()
The second technique also provides access to other useful methods on the field:
- numeric value
- text value
- short text value
- maximum/minimum values
- add/subtract
- set
- rounding
LocalDate 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 1.3