The
CalendarDate
class represents a specific instant in time by calendar date and time fields that are multiple cycles in different time unites. The semantics of each calendar field is given by a concrete calendar system rather than this
CalendarDate
class that holds calendar field values without interpreting them. Therefore, this class can be used to represent an amount of time, such as 2 years and 3 months.
A CalendarDate
instance can be created by calling the newCalendarDate
or getCalendarDate
methods in CalendarSystem
. A CalendarSystem
instance is obtained by calling one of the factory methods in CalendarSystem
. Manipulations of calendar dates must be handled by the calendar system by which CalendarDate
instances have been created.
Some calendar fields can be modified through method calls. Any modification of a calendar field brings the state of a CalendarDate
to not normalized. The normalization must be performed to make all the calendar fields consistent with a calendar system.
The protected
methods are intended to be used for implementing a concrete calendar system, not for general use as an API.
@see CalendarSystem
@author Masayoshi Okutsu
@since 1.5