Class HistoricChronology
- All Implemented Interfaces:
Serializable, Calendrical
HistoricChronology defines the rules of the Historic calendar system. The Historic calendar has twelve months of 30 days followed by an additional period of 5 or 6 days, modelled as the thirteenth month in this implementation.
Years are measured in the 'Era of the Martyrs'. 0001-01-01 (Historic) equals 0284-08-29 (ISO). The supported range is from Historic year 1 to year 9999 (inclusive).
HistoricChronology is immutable and thread-safe.
- Author:
- Stephen Colebourne
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic HistoricChronologyObtains an instance ofHistoricChronologyspecifying the cutover date when the Gregorian/ISO calendar system was first used.Gets the rule for the day-of-month field in the Historic chronology.Gets the rule for the day-of-week field in the Historic chronology.Gets the rule for the day-of-year field in the Historic chronology.eraRule()Gets the rule for the year field in the Historic chronology.Gets the cutover date of the chronology.getName()Gets the name of the chronology.booleanisLeapYear(int year) Checks if the specified year is a leap year.Gets the rule for the month-of-year field in the Historic chronology.static PeriodUnitGets the period unit for days.static PeriodUnitGets the period unit for eras.static PeriodUnitGets the period unit for months.static PeriodUnitGets the period unit for weeks.static PeriodUnitGets the period unit for years.static HistoricChronologyObtains an instance ofHistoricChronologyusing the standard cutover date of 1582-10-15.Gets the rule for the year field in the Historic chronology.yearRule()Gets the rule for the year field in the Historic chronology.Methods inherited from class Chronology
get, rule, toString
-
Method Details
-
cutoverAt
Obtains an instance ofHistoricChronologyspecifying the cutover date when the Gregorian/ISO calendar system was first used.- Parameters:
cutover- the cutover date, not null- Returns:
- a
HistoricChronology, never null
-
standardCutover
Obtains an instance ofHistoricChronologyusing the standard cutover date of 1582-10-15.- Returns:
- a
HistoricChronology, never null
-
isLeapYear
public boolean isLeapYear(int year) Checks if the specified year is a leap year.A year is leap if the remainder after division by four equals three. This method does not validate the year passed in, and only has a well-defined result for years in the supported range.
- Parameters:
year- the year to check, not validated for range- Returns:
- true if the year is a leap year
-
getCutover
Gets the cutover date of the chronology.- Returns:
- the cutover date of the chronology, never null
-
getName
Gets the name of the chronology.- Specified by:
getNamein classChronology- Returns:
- the name of the chronology, never null
-
eraRule
Gets the rule for the year field in the Historic chronology.- Returns:
- the rule for the year field, never null
-
yearOfEraRule
Gets the rule for the year field in the Historic chronology.- Returns:
- the rule for the year field, never null
-
yearRule
Gets the rule for the year field in the Historic chronology.- Returns:
- the rule for the year field, never null
-
monthOfYearRule
Gets the rule for the month-of-year field in the Historic chronology.- Returns:
- the rule for the month-of-year field, never null
-
dayOfMonthRule
Gets the rule for the day-of-month field in the Historic chronology.- Returns:
- the rule for the day-of-month field, never null
-
dayOfYearRule
Gets the rule for the day-of-year field in the Historic chronology.- Returns:
- the rule for the day-of-year field, never null
-
dayOfWeekRule
Gets the rule for the day-of-week field in the Historic chronology.- Returns:
- the rule for the day-of-week field, never null
-
periodEras
Gets the period unit for eras.The period unit defines the concept of a period of an era.
This is a basic unit and has no equivalent period. The estimated duration is equal to 2,000,000,000 years. This is equivalent to the ISO era period unit.
See
eraRule()for the main date-time field.- Returns:
- the period unit for years, never null
-
periodYears
Gets the period unit for years.The period unit defines the concept of a period of a year. This has an estimated duration equal to 365.25 days.
See
yearRule()for the main date-time field.- Returns:
- the period unit for years, never null
-
periodMonths
Gets the period unit for months.The period unit defines the concept of a period of a month. Historic months are typically 30 days long, except for the 13th month which is 5 or 6 days long. The rule uses an estimated duration of 29.5 days.
See
monthOfYearRule()for the main date-time field.- Returns:
- the period unit for months, never null
-
periodWeeks
Gets the period unit for weeks.The period unit defines the concept of a period of a week. This is equivalent to the ISO weeks period unit.
- Returns:
- the period unit for weeks, never null
-
periodDays
Gets the period unit for days.The period unit defines the concept of a period of a day. This is equivalent to the ISO days period unit.
See
dayOfMonthRule()for the main date-time field.- Returns:
- the period unit for days, never null
-