Interface CalendarSystem<D>
- Type Parameters:
D- generic type of calendar date (subtype ofCalendricalorCalendarVariant)
Represents a calendar system which can map a calendar date to a day number corresponding to the count of days elapsed since UTC epoch [1972-01-01].
Note: All implementations must be immutable.
- Author:
- Meno Hochschild
- See Also:
Calendrical,CalendarVariant,EpochDays
-
Method Summary
Modifier and TypeMethodDescriptiongetEras()Yields an enumeration of valid eras in ascending order.longGets the maximum day number as count of days since the introduction of UTC [1972-01-01].longGets the minimum day number as count of days since the introduction of UTC [1972-01-01].transform(long utcDays)Transforms given day number to a calendar date on the local time line at the reference time of noon.longTransforms given calendar date to a day number on the local time line at the reference time of noon.
-
Method Details
-
transform
Transforms given day number to a calendar date on the local time line at the reference time of noon.
- Parameters:
utcDays- count of days since UTC epoch [1972-01-01]- Returns:
- new calendar date
- Throws:
IllegalArgumentException- if the argument is out of range
-
transform
Transforms given calendar date to a day number on the local time line at the reference time of noon.
- Parameters:
date- calendar date to be transformed- Returns:
- count of days since UTC epoch [1972-01-01]
- Throws:
IllegalArgumentException- if the argument is not consistent with this calendar system
-
getMinimumSinceUTC
long getMinimumSinceUTC()Gets the minimum day number as count of days since the introduction of UTC [1972-01-01].
- Returns:
- smallest count of days relative to UTC epoch [1972-01-01]
- See Also:
getMaximumSinceUTC()
-
getMaximumSinceUTC
long getMaximumSinceUTC()Gets the maximum day number as count of days since the introduction of UTC [1972-01-01].
- Returns:
- largest count of days relative to UTC epoch [1972-01-01]
- See Also:
getMinimumSinceUTC()
-
getEras
List<CalendarEra> getEras()Yields an enumeration of valid eras in ascending order.
All ISO-systems only yield an empty list. A gregorian calendar defines the eras
BCandADrelated to Jesu birth however.- Returns:
- unmodifiable list of eras (maybe empty)
-