Joda Time API

org.joda.time.iso
Class ISOChronology

java.lang.Object
  |
  +--org.joda.time.Chronology
        |
        +--org.joda.time.iso.ISOChronology
All Implemented Interfaces:
java.io.Serializable

public final class ISOChronology
extends Chronology

ISOChronology provides access to the individual date time fields for the ISO8601 defined chronological calendar system. When ISO does not define a field, but it can be determined (such as AM/PM) it is included.

Author:
Stephen Colebourne, Brian S O'Neill
See Also:
Serialized Form

Method Summary
 Chronology asUTC()
          Returns an instance of this Chronology that operates in the UTC time zone.
 long getDateOnlyMillis(long millis)
          Get the millis for a date only field.
 DateTimeZone getDateTimeZone()
          Returns the DateTimeZone that this Chronology operates in, or null if unspecified.
static Chronology getInstance()
          Gets an instance of the ISOChronology.
static Chronology getInstance(DateTimeZone zone)
          Gets an instance of the ISOChronology.
 long getTimeOnlyMillis(long millis)
          Get the millis for a time only field.
 
Methods inherited from class org.joda.time.Chronology
amPmOfDay, dayOfMonth, dayOfWeek, dayOfYear, era, hourClockOfAmPm, hourClockOfDay, hourOfAmPm, hourOfDay, leapYear, millisOfDay, millisOfSecond, minuteOfDay, minuteOfHour, monthOfYear, secondOfDay, secondOfMinute, weekOfYearWeek, weekOfYearYear, year, yearOfEra
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Chronology getInstance()
Gets an instance of the ISOChronology. The time zone of the returned instance is UTC.

Returns:
a singleton UTC instance of the chronology

getInstance

public static Chronology getInstance(DateTimeZone zone)
Gets an instance of the ISOChronology. If the time zone specified is null, the default time zone is used.

Parameters:
zone - the time zone to get the chronology in
Returns:
a chronology in the specified time zone

getDateTimeZone

public DateTimeZone getDateTimeZone()
Description copied from class: Chronology
Returns the DateTimeZone that this Chronology operates in, or null if unspecified.

Specified by:
getDateTimeZone in class Chronology
Returns:
DateTimeZone null if unspecified

asUTC

public Chronology asUTC()
Description copied from class: Chronology
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.

Specified by:
asUTC in class Chronology
Returns:
a version of this chronology that ignores time zones

getTimeOnlyMillis

public long getTimeOnlyMillis(long millis)
Get the millis for a time only field.

Specified by:
getTimeOnlyMillis in class Chronology
Parameters:
millis - the millis to convert to time only
Returns:
millis with the date part stripped

getDateOnlyMillis

public long getDateOnlyMillis(long millis)
Get the millis for a date only field.

Specified by:
getDateOnlyMillis in class Chronology
Parameters:
millis - the millis to convert to date only
Returns:
millis with the time part stripped

Joda Time API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.