The Gregorian calendar replaced the Julian calendar, and the point in time when this chronology switches can be controlled using the second parameter of the getInstance method. By default this cutover is set to the date the Gregorian calendar was first instituted, October 15, 1582.
Before this date, this chronology uses the proleptic Julian calendar (proleptic means extending indefinitely). The Julian calendar has leap years every four years, whereas the Gregorian has special rules for 100 and 400 years. A meaningful result will thus be obtained for all input values. However before 8 CE, Julian leap years were irregular, and before 45 BCE there was no Julian calendar.
This chronology differs from {@link java.util.GregorianCalendar GregorianCalendar} in that yearsin BCE are returned correctly. Thus year 1 BCE is returned as -1 instead of 1. The yearOfEra field produces results compatible with GregorianCalendar.
The Julian calendar does not have a year zero, and so year -1 is followed by year 1. If the Gregorian cutover date is specified at or before year -1 (Julian), year zero is defined. In other words, the proleptic Gregorian chronology used by this class has a year zero.
To create a pure proleptic Julian chronology, use {@link JulianChronology}, and to create a pure proleptic Gregorian chronology, use {@link GregorianChronology}.
GJChronology is thread-safe and immutable. @author Brian S O'Neill @author Stephen Colebourne @since 1.0
|
|
|
|
|
|
|
|