public final class

ISOChronology

extends AssembledChronology
java.lang.Object
   ↳ org.joda.time.Chronology
     ↳ org.joda.time.chrono.BaseChronology
       ↳ org.joda.time.chrono.AssembledChronology
         ↳ org.joda.time.chrono.ISOChronology

Class Overview

Implements a chronology that follows the rules of the ISO8601 standard, which is compatible with Gregorian for all modern dates. When ISO does not define a field, but it can be determined (such as AM/PM) it is included.

With the exception of century related fields, ISOChronology is exactly the same as GregorianChronology. In this chronology, centuries and year of century are zero based. For all years, the century is determined by dropping the last two digits of the year, ignoring sign. The year of century is the value of the last two year digits.

ISOChronology is thread-safe and immutable.

Summary

Public Methods
boolean equals(Object obj)
Checks if this chronology instance equals another.
static ISOChronology getInstance(DateTimeZone zone)
Gets an instance of the ISOChronology in the given time zone.
static ISOChronology getInstance()
Gets an instance of the ISOChronology in the default time zone.
static ISOChronology getInstanceUTC()
Gets an instance of the ISOChronology.
int hashCode()
A suitable hash code for the chronology.
String toString()
Gets a debugging toString.
Chronology withUTC()
Gets the Chronology in the UTC time zone.
Chronology withZone(DateTimeZone zone)
Gets the Chronology in a specific time zone.
Protected Methods
void assemble(AssembledChronology.Fields fields)
Invoked by the constructor and after deserialization to allow subclasses to define all of its supported fields.
[Expand]
Inherited Methods
From class org.joda.time.chrono.AssembledChronology
From class org.joda.time.chrono.BaseChronology
From class org.joda.time.Chronology
From class java.lang.Object

Public Methods

public boolean equals (Object obj)

Checks if this chronology instance equals another.

Parameters
obj the object to compare to
Returns
  • true if equal

public static ISOChronology getInstance (DateTimeZone zone)

Gets an instance of the ISOChronology in the given time zone.

Parameters
zone the time zone to get the chronology in, null is default
Returns
  • a chronology in the specified time zone

public static ISOChronology getInstance ()

Gets an instance of the ISOChronology in the default time zone.

Returns
  • a chronology in the default time zone

public static ISOChronology getInstanceUTC ()

Gets an instance of the ISOChronology. The time zone of the returned instance is UTC.

Returns
  • a singleton UTC instance of the chronology

public int hashCode ()

A suitable hash code for the chronology.

Returns
  • the hash code

public String toString ()

Gets a debugging toString.

Returns
  • a debugging string

public Chronology withUTC ()

Gets the Chronology in the UTC time zone.

Returns
  • the chronology in UTC

public Chronology withZone (DateTimeZone zone)

Gets the Chronology in a specific time zone.

Parameters
zone the zone to get the chronology in, null is default
Returns
  • the chronology

Protected Methods

protected void assemble (AssembledChronology.Fields fields)

Invoked by the constructor and after deserialization to allow subclasses to define all of its supported fields. All unset fields default to unsupported instances.

Parameters
fields container of fields