public final class

BuddhistChronology

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

Class Overview

A chronology that matches the BuddhistCalendar class supplied by Sun.

The chronology is identical to the Gregorian/Julian, except that the year is offset by +543 and the era is named 'BE' for Buddhist Era.

This class was intended by Sun to model the calendar used in Thailand. However, the actual rules for Thailand are much more involved than this class covers. (This class is accurate after 1941-01-01 ISO).

This chronlogy is being retained for those who want a same effect replacement for the Sun class. It is hoped that community support will enable a more accurate chronology for Thailand, to be developed.

BuddhistChronology is thread-safe and immutable.

Summary

Constants
int BE Constant value for 'Buddhist Era', equivalent to the value returned for AD/CE.
Public Methods
boolean equals(Object obj)
Checks if this chronology instance equals another.
synchronized static BuddhistChronology getInstance(DateTimeZone zone)
Standard instance of a Buddhist Chronology, that matches Sun's BuddhistCalendar class.
static BuddhistChronology getInstance()
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.
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

Constants

public static final int BE

Constant value for 'Buddhist Era', equivalent to the value returned for AD/CE. Note that this differs from the constant in BuddhistCalendar.

Constant Value: 1 (0x00000001)

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 synchronized 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

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.

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.

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