Request for Adding Buddhist Calendar System

John Layt johnlayt at
Sun Mar 14 12:09:10 GMT 2010

On Sunday 14 Mar 2010 04:51:40 Thanomsub Noppaburana wrote:
> Hello every devs,
> I have been patched Buddhist Calendar System to KDE (in the attatchmens).
> Since it is based on Gregorian Calendar system except year differ +543AD,
> So, i'm sure this Buddhist Calendar System would not have any problems.
> Buddhist Calendar System is most use in Thailand.
> Another patch is the adding Thai Digits to KDE.
> Thai Digits is most use in Thai Government's Documents.
> This Thai Digits patch is very simple.
> I have posted these patch to Thai Linux/FOSS
> developers<>on
> google groups,
> but no reponse from other Thai developers,
> So, i decided to submit this patch to KDE-core-devel directly.
> Please review and consider to include these patches to the next KDE
> release.
> Thanks,
> Thanomsub Noppaburana.
> Donga.

Hi Thanomsub,

I'm the official maintainer of Calendar Systems in KDE.  Thank you for these 
patches, the Buddhist calendar is on my to-do list for 4.5, but I had a number 
of questions about how to do it right so it's great to have expert help :-)

At a quick look, there's a few issues that spring to mind based on my previous 

* QDate
You use QDate for the Gregorian calendar base calculations, which as you note 
causes an issue with QDate's hybrid Julian/Gregorian calendar.  However, we do 
have a KCalendarSystemGregorianProleptic class which implements a 'pure' 
Gregorian calculation which you could use instead.  If you look at 
KCalendarSystemIndianNational calendar you can see an example of this.

* Year Numbering
The big questions is do we need to adjust for the different epochs and New 
Years days used historically and keep the year numbers the same as observed?  
In other words, are we implementing an 'ideal' calendar as it exists today, or 
do we want an 'historic' calendar to show the dates as they really were in the 
past (like QDate sort-of does)?

My understanding of the epochs/New Years used is:
  1888 to 1912 used the Rattanakosin Era epoch April 6 1782 AD
  1912 to 1941 used the Buddhist Era epoch April 1 545 BC
  1941 to now  uses the Buddhist Era epoch January 1 545 BC

We could implement 'pure' private classes for each of these calculations, then 
have a separate "Thai Solar" class made available to the users that switches 
between them based on the date.  Or we could just have a single class with all 
the calculations in one place switched on date.  Or we could just support the 
current calculation and not worry about historical accuracy.

How do Thai people deal with this in daily life, for example in school text 
books, do they refer to dates before 1941 or 1912 by the old year numbers or 
the new year numbers?

* Naming
You call it the Buddhist calendar, but I think I would prefer to call it 
something like the "Thai (Buddhist Era)" or "Thai Solar" (as Wikipedia does as there is actually the 
Buddhist lunisolar calendar ( 
which we may implement one day and I don't want them to get confused.  Any 
other suggestions?

* Month and day names.
When referring to the months and days in English, is it more common to use the 
English names or transcriptions of the Thai names?  So would you expect to see 
January or Makarakhom?

OK, I think that's enough enough questions for now :-)  I'm looking forward to 
your reply.

For initial discussions, the mailing list is always the best starting point, 
but the best place for submitting code is via our Review Board at where it's easier for people to look at and comment 
on the code in context.

Many thanks,


More information about the kde-core-devel mailing list