Joda Time API

org.joda.time.buddhist
Class BuddhistChronology

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

public final class BuddhistChronology
extends Chronology

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.

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

Field Summary
static int BE
          Contant value for 'Buddhist Era', equivalent to the value returned for AD/CE.
 
Method Summary
 DateTimeField amPmOfDay()
          Get the AM (0) PM(1) field for this chronology.
 Chronology asUTC()
          Returns an instance of this Chronology that operates in the UTC time zone.
 DateTimeField dayOfMonth()
          Get the day of month field for this chronology.
 DateTimeField dayOfWeek()
          Get the day of week field for this chronology.
 DateTimeField dayOfYear()
          Get the day of year field for this chronology.
 DateTimeField era()
          Get the era field for this chronology.
 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()
          Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class.
static Chronology getInstance(DateTimeZone zone)
          Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class.
 long getTimeOnlyMillis(long millis)
          Get the millis for a time only field.
 DateTimeField hourClockOfAmPm()
          Get the hour of am/pm (offset to 1-12) field for this chronology.
 DateTimeField hourClockOfDay()
          Get the hour of day (offset to 1-24) field for this chronology.
 DateTimeField hourOfAmPm()
          Get the hour of am/pm (0-11) field for this chronology.
 DateTimeField hourOfDay()
          Get the hour of day (0-23) field for this chronology.
 DateTimeField leapYear()
          Get the leap year field for this chronology.
 DateTimeField millisOfDay()
          Get the millis of day field for this chronology.
 DateTimeField millisOfSecond()
          Get the millis of second field for this chronology.
 DateTimeField minuteOfDay()
          Get the minute of day field for this chronology.
 DateTimeField minuteOfHour()
          Get the minute of hour field for this chronology.
 DateTimeField monthOfYear()
          Get the month of year field for this chronology.
 DateTimeField secondOfDay()
          Get the second of day field for this chronology.
 DateTimeField secondOfMinute()
          Get the second of minute field for this chronology.
 DateTimeField weekOfYearWeek()
          Get the week of year week field for this chronology.
 DateTimeField weekOfYearYear()
          Get the week of year year field for this chronology.
 DateTimeField year()
          Get the year field for this chronology.
 DateTimeField yearOfEra()
          Get the year of era field for this chronology.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BE

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

See Also:
Constant Field Values
Method Detail

getInstance

public static Chronology 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.

The time zone of the returned instance is UTC.


getInstance

public static Chronology 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.

If the time zone specified is null, the default time zone is used.

Parameters:
zone - the time zone to use, or null if default

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

millisOfSecond

public DateTimeField millisOfSecond()
Get the millis of second field for this chronology.

Overrides:
millisOfSecond in class Chronology
Returns:
DateTimeField

millisOfDay

public DateTimeField millisOfDay()
Get the millis of day field for this chronology.

Overrides:
millisOfDay in class Chronology
Returns:
DateTimeField

secondOfMinute

public DateTimeField secondOfMinute()
Get the second of minute field for this chronology.

Overrides:
secondOfMinute in class Chronology
Returns:
DateTimeField

secondOfDay

public DateTimeField secondOfDay()
Get the second of day field for this chronology.

Overrides:
secondOfDay in class Chronology
Returns:
DateTimeField

minuteOfHour

public DateTimeField minuteOfHour()
Get the minute of hour field for this chronology.

Overrides:
minuteOfHour in class Chronology
Returns:
DateTimeField

minuteOfDay

public DateTimeField minuteOfDay()
Get the minute of day field for this chronology.

Overrides:
minuteOfDay in class Chronology
Returns:
DateTimeField

hourOfDay

public DateTimeField hourOfDay()
Get the hour of day (0-23) field for this chronology.

Overrides:
hourOfDay in class Chronology
Returns:
DateTimeField

hourClockOfDay

public DateTimeField hourClockOfDay()
Get the hour of day (offset to 1-24) field for this chronology.

Overrides:
hourClockOfDay in class Chronology
Returns:
DateTimeField

hourOfAmPm

public DateTimeField hourOfAmPm()
Get the hour of am/pm (0-11) field for this chronology.

Overrides:
hourOfAmPm in class Chronology
Returns:
DateTimeField

hourClockOfAmPm

public DateTimeField hourClockOfAmPm()
Get the hour of am/pm (offset to 1-12) field for this chronology.

Overrides:
hourClockOfAmPm in class Chronology
Returns:
DateTimeField

amPmOfDay

public DateTimeField amPmOfDay()
Get the AM (0) PM(1) field for this chronology.

Overrides:
amPmOfDay in class Chronology
Returns:
DateTimeField

dayOfWeek

public DateTimeField dayOfWeek()
Get the day of week field for this chronology.

Overrides:
dayOfWeek in class Chronology
Returns:
DateTimeField

dayOfMonth

public DateTimeField dayOfMonth()
Get the day of month field for this chronology.

Overrides:
dayOfMonth in class Chronology
Returns:
DateTimeField

dayOfYear

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

Overrides:
dayOfYear in class Chronology
Returns:
DateTimeField

weekOfYearWeek

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

Overrides:
weekOfYearWeek in class Chronology
Returns:
DateTimeField

weekOfYearYear

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

Overrides:
weekOfYearYear in class Chronology
Returns:
DateTimeField

monthOfYear

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

Overrides:
monthOfYear in class Chronology
Returns:
DateTimeField

year

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

Overrides:
year in class Chronology
Returns:
DateTimeField

yearOfEra

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

Overrides:
yearOfEra in class Chronology
Returns:
DateTimeField

era

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

Overrides:
era in class Chronology
Returns:
DateTimeField

leapYear

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

Overrides:
leapYear in class Chronology
Returns:
DateTimeField

Joda Time API

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