Joda Time API

org.joda.time.chrono.buddhist
Class BuddhistChronology

java.lang.Object
  |
  +--org.joda.time.Chronology
        |
        +--org.joda.time.chrono.DelegateChronology
              |
              +--org.joda.time.chrono.buddhist.BuddhistChronology
All Implemented Interfaces:
java.io.Serializable

public final class BuddhistChronology
extends DelegateChronology

BuddhistChronology provides access to the individual date time fields for the Buddhist chronological calendar system.

The Buddhist calendar differs from the GregorianJulian calendar only in the year. This class is compatable with the BuddhistCalendar class supplied by Sun.

At present the century fields are unsupported.

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

Field Summary
static int BE
          Constant value for 'Buddhist Era', equivalent to the value returned for AD/CE.
 
Method Summary
 DateTimeField centuryOfEra()
          Get the century of era field for this chronology.
 DateTimeField era()
          Get the era field for this chronology.
static BuddhistChronology getInstance()
          Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class.
static BuddhistChronology getInstance(DateTimeZone zone)
          Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class.
static BuddhistChronology getInstanceUTC()
          Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class.
 java.lang.String toString()
          Gets a debugging toString.
 DateTimeField weekyear()
          Get the year of a week based year field for this chronology.
 Chronology withDateTimeZone(DateTimeZone zone)
          Gets the Chronology in a specific time zone.
 Chronology withUTC()
          Gets the Chronology in the UTC time zone.
 DateTimeField year()
          Get the year field for this chronology.
 DateTimeField yearOfCentury()
          Get the year of century field for this chronology.
 DateTimeField yearOfEra()
          Get the year of era field for this chronology.
 
Methods inherited from class org.joda.time.chrono.DelegateChronology
clockhourOfDay, clockhourOfHalfday, dayOfMonth, dayOfWeek, dayOfYear, getChronology, getDateTimeZone, halfdayOfDay, hourOfDay, hourOfHalfday, millisOfDay, millisOfSecond, minuteOfDay, minuteOfHour, monthOfYear, secondOfDay, secondOfMinute, weekOfWeekyear
 
Methods inherited from class org.joda.time.Chronology
getDateOnlyMillis, getTimeOnlyMillis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BE

public static final int BE
Constant value for 'Buddhist Era', equivalent to the value returned for AD/CE.

See Also:
Constant Field Values
Method Detail

getInstanceUTC

public static BuddhistChronology getInstanceUTC()
Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class. This means that it follows the GregorianJulian calendar rules with a cutover date.

The time zone of the returned instance is UTC.


getInstance

public static BuddhistChronology getInstance()
Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class. This means that it follows the GregorianJulian calendar rules with a cutover date.


getInstance

public static BuddhistChronology getInstance(DateTimeZone zone)
Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class. This means that it follows the GregorianJulian calendar rules with a cutover date.

Parameters:
zone - the time zone to use, null is default
Throws:
java.lang.IllegalArgumentException - if the zone is null

withUTC

public Chronology withUTC()
Gets the Chronology in the UTC time zone.

Specified by:
withUTC in class DelegateChronology
Returns:
the chronology in UTC

withDateTimeZone

public Chronology withDateTimeZone(DateTimeZone zone)
Gets the Chronology in a specific time zone.

Specified by:
withDateTimeZone in class DelegateChronology
Parameters:
zone - the zone to get the chronology in, null is default
Returns:
the chronology

weekyear

public DateTimeField weekyear()
Get the year of a week based year field for this chronology.

Overrides:
weekyear in class DelegateChronology
Returns:
DateTimeField

year

public DateTimeField year()
Get the year field for this chronology.

Overrides:
year in class DelegateChronology
Returns:
DateTimeField

yearOfEra

public DateTimeField yearOfEra()
Get the year of era field for this chronology.

Overrides:
yearOfEra in class DelegateChronology
Returns:
DateTimeField

yearOfCentury

public DateTimeField yearOfCentury()
Get the year of century field for this chronology.

Overrides:
yearOfCentury in class DelegateChronology
Returns:
DateTimeField
Throws:
java.lang.UnsupportedOperationException - always

centuryOfEra

public DateTimeField centuryOfEra()
Get the century of era field for this chronology.

Overrides:
centuryOfEra in class DelegateChronology
Returns:
DateTimeField
Throws:
java.lang.UnsupportedOperationException - always

era

public DateTimeField era()
Get the era field for this chronology.

Overrides:
era in class DelegateChronology
Returns:
DateTimeField

toString

public java.lang.String toString()
Gets a debugging toString.

Overrides:
toString in class java.lang.Object
Returns:
a debugging string

Joda Time API

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