DateTime
is the most widely used implementation of {@link ReadableInstant}. As with all instants, it represents an exact point on the time-line, but limited to the precision of milliseconds. A DateTime
calculates its fields with respect to a {@link DateTimeZone time zone}.
Internally, the class holds two pieces of data. Firstly, it holds the datetime as milliseconds from the Java epoch of 1970-01-01T00:00:00Z. Secondly, it holds a {@link Chronology} which determines how themillisecond instant value is converted into the date time fields. The default Chronology is {@link ISOChronology} which is the agreedinternational standard and compatible with the modern Gregorian calendar.
Each individual field can be queried in two ways:
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. @author Stephen Colebourne @author Kandarp Shah @author Brian S O'Neill @since 1.0 @see MutableDateTime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|