Date Time Unit
A unit for measuring time.
See the predefined constants for time units, like DateTimeUnit.NANOSECOND, DateTimeUnit.DAY, DateTimeUnit.MONTH, and others.
Two ways are provided to create custom DateTimeUnit instances:
By multiplying an existing unit on the right by an integer scalar: for example,
DateTimeUnit.NANOSECOND * 10
.By constructing an instance manually with TimeBased, DayBased, or MonthBased: for example,
TimeBased(nanoseconds = 10)
.
Note that a calendar day is not considered identical to 24 hours. See DateTimeUnit.DayBased for a discussion.
Inheritors
Types
A date-time unit equal to some number of days or months.
A date-time unit equal to some number of calendar days.
A date-time unit equal to some number of months.
A date-time unit that has the precise time duration.
Functions
Produces a date-time unit that is a multiple of this unit times the specified integer scalar value.