- All Known Implementing Classes:
External time units which are not registered on any chronology (time axis) can implement this interface in order to support standard calculations in time spans and symbol formatting.
Naming convention: Time units have Java-names in plural form.
Note: All implementations must be immutable.
- Meno Hochschild
Method SummaryModifier and TypeMethodDescription
()Defines the typical length of this time unit in seconds without taking into account anomalies like timezone effects or leap seconds.
()Queries if this time unit is calendrical respective is at least as long as a calendar day.
Defines the typical length of this time unit in seconds without taking into account anomalies like timezone effects or leap seconds.
Important note: This method can only yield an estimated value and is not intended to assist in calculations of durations, but only in sorting of units.
- estimated decimal value in seconds
isCalendricaldefault boolean isCalendrical()
Queries if this time unit is calendrical respective is at least as long as a calendar day.
Implementation note: The method must be consistent with the typical length of the unit. The expression
Double.compare(unit.getLength(), 86400.0) >= 0is equivalent to
trueif at least as long as a day else