Chronology provides access to the individual date time fields for a chronological calendar system.
Various chronologies are supported by subclasses including ISO and GregorianJulian. To construct a Chronology you should use the factory methods on the chronology subclass in the chrono package.
For example, to obtain the current time in the coptic calendar system:
DateTime dt = new DateTime(CopticChronology.getInstance());
The provided chronology implementations are:
- ISO - Based on the ISO8601 standard and suitable for use after about 1600
- GJ - Historically accurate calendar with Julian followed by Gregorian
- Gregorian - The Gregorian calendar system used for all time (proleptic)
- Julian - The Julian calendar system used for all time (proleptic)
- Buddhist - The Buddhist calendar system which is an offset in years from GJ
- Coptic - The Coptic calendar system which defines 30 day months
- Ethiopic - The Ethiopic calendar system which defines 30 day months
Hopefully future releases will contain more chronologies.
This class defines a number of fields with names from the ISO8601 standard. It does not 'strongly' define these fields however, thus implementations are free to interpret the field names as they wish. For example, a week could be defined as 10 days and a month as 40 days in a special WeirdChronology implementation. Clearly the GJ and ISO implementations provided use the field names as you would expect.
@see org.joda.time.chrono.ISOChronology
@see org.joda.time.chrono.GJChronology
@see org.joda.time.chrono.GregorianChronology
@see org.joda.time.chrono.JulianChronology
@see org.joda.time.chrono.CopticChronology
@see org.joda.time.chrono.BuddhistChronology
@see org.joda.time.chrono.EthiopicChronology
@author Stephen Colebourne
@author Brian S O'Neill
@since 1.0