Package org.gvsig.timesupport
Interface Chronology
public interface Chronology
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 TimeSupportManager.
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
Instances of this class are singletons and they can be compared using the
ChronologygetType() method and the ==
operator.
A huge part of the documentation of this class has been retrieved from the joda-time library.
- Version:
- $Id$
- Author:
- gvSIG Team
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintgetType()Gets the code of the type, that is one of the constants defined in theChronologyclass.withUTC()Returns an instance of this Chronology that operates in the UTC time zone.
-
Field Details
-
BUDDHIST
static final int BUDDHIST- See Also:
-
COPTIC
static final int COPTIC- See Also:
-
GJ
static final int GJ- See Also:
-
GREGORIAN
static final int GREGORIAN- See Also:
-
ISO
static final int ISO- See Also:
-
JULIAN
static final int JULIAN- See Also:
-
-
Method Details
-
getType
int getType()Gets the code of the type, that is one of the constants defined in theChronologyclass.- Returns:
- the type code
-
withUTC
Chronology withUTC()Returns an instance of this Chronology that operates in the UTC time zone. Chronologies that do not operate in a time zone or are already UTC must return themself.- Returns:
- a version of this chronology that ignores time zones
-