Author(s)Stephen Colebourne, Kandarp Shah, Brian S O'Neill
DateTime is the standard implementation of an unmodifiable datetime class.
It holds the datetime as milliseconds from the Java epoch of 1970-01-01T00:00:00Z.
This class uses a Chronology internally. The Chronology determines how the
millisecond instant value is converted into the date time fields.
The default Chronology is ISOChronology which is the agreed
international standard and compatable with the modern Gregorian calendar.
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
DateTime is thread-safe and immutable, provided that the Chronology is as well.
All standard Chronology classes supplied are thread-safe and immutable.
This class uses a Chronology internally. The Chronology determines how the millisecond instant value is converted into the date time fields. The default Chronology is
ISOChronologywhich is the agreed international standard and compatable with the modern Gregorian calendar.Each individual field can be queried in two ways:
The second technique also provides access to other useful methods on the field:getHourOfDay()hourOfDay().get()DateTime is thread-safe and immutable, provided that the Chronology is as well. All standard Chronology classes supplied are thread-safe and immutable.