LocalDateTime is an unmodifiable datetime class representing a datetime without a time zone.
LocalDateTime implements the {@link ReadablePartial} interface.To do this, certain methods focus on key fields Year, MonthOfYear, DayOfYear and MillisOfDay. However, all fields may in fact be queried.
Internally, LocalDateTime uses a single millisecond-based value to represent the local datetime. This value is only used internally and is not exposed to applications.
Calculations on LocalDateTime 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:
getHourOfDay()
hourOfDay().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
LocalDateTime 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