javax.time.calendar
Class ISOChronology

java.lang.Object
  extended by javax.time.calendar.Chronology
      extended by javax.time.calendar.ISOChronology
All Implemented Interfaces:
java.io.Serializable, Calendrical

public final class ISOChronology
extends Chronology
implements java.io.Serializable

The ISO-8601 calendar system, which follows the rules of the current de facto world calendar.

ISOChronology follows the rules of the Gregorian calendar for all time. Thus, dates is the past, and particularly before 1583, may not correspond to historical documents.

ISOChronology is immutable and thread-safe.

Author:
Michael Nascimento Santos, Stephen Colebourne
See Also:
Serialized Form

Field Summary
static ISOChronology INSTANCE
          The singleton instance of ISOChronology.
 
Method Summary
 java.lang.String getName()
          Gets the name of the chronology.
static boolean isLeapYear(long year)
          Checks if the specified year is a leap year according to the ISO calendar system rules.
 
Methods inherited from class javax.time.calendar.Chronology
get, rule, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final ISOChronology INSTANCE
The singleton instance of ISOChronology.

Method Detail

isLeapYear

public static boolean isLeapYear(long year)
Checks if the specified year is a leap year according to the ISO calendar system rules.

The ISO calendar system applies the current rules for leap years across the whole time-line. In general, a year is a leap year if it is divisible by four without remainder. However, years divisible by 100, are not leap years, with the exception of years divisible by 400 which are.

For example, 1904 is a leap year it is divisible by 4. 1900 was not a leap year as it is divisible by 100, however 2000 was a leap year as it is divisible by 400.

The calculation is proleptic - applying the same rules into the far future and far past. This is historically inaccurate, but is correct for the ISO-8601 standard.

Parameters:
year - the year to check, may be outside the valid range for the rule
Returns:
true if the year is a leap year

getName

public java.lang.String getName()
Gets the name of the chronology.

Specified by:
getName in class Chronology
Returns:
the name of the chronology, not null