Buddhist calendar system

The Buddhist calendar system implemented in Joda-Time is based on that supplied in the private Sun packages of a typical JDK. It differs from the GregorianJulian calendar only in the year and era. The Buddhist calendar has one era (the current era), and has a year offset by 543 from the current Gregorian year.

It appears that Sun developed the Buddhist Calendar system to meet the needs of Thailand. However, the calendar is only accurate from 1941-01-01 (ISO). Before that date Thailand used three other calendar systems. The BuddhistChronology follows the design of the BuddhistCalendar. It is hoped that in the future an accurate Thai chronology can be developed.

References

Using Buddhist chronology in Joda-Time

Within Joda-Time the Buddhist calendar system can be used by obtaining an instance of BuddhistChronology. This is normally created using the factory method BuddhistChronology.getInstance(). This is then passed into the constructors of the main date and time classes.

// setup date object for midday on May Day 2004 (ISO year 2004)
DateTime dtISO = new DateTime(2004, 5, 1, 12, 0, 0, 0);

// find out what the same instant is using the Buddhist Chronology
DateTime dtBudd = dtISO.withChronology(BuddhistChronology.getInstance());

Back to top

Version: 2.13.0. Last Published: 2024-09-17.

Reflow Maven skin.