The "Thai Buddhist" calendar isn't

by Michael S. Kaplan, published on 2011/08/02 07:01 -04:00, original URI:

So yesterday in The only way to be impressed by Microsoft is to ignore calendars, I pointed out some real limitations in the calendaring support on Windows.

And there are some serious flaws there.

Now as a part of that, I talked about the wide amount of variation between the different types of calendars.

I talked about the years with 354 days in them.

And the years with 355 days in them.

And also the years with 384 days in them.

And of course, the years with 385 days in them.

But in all of that discussion, I never pointed out the number of days in the Microsoft implementation of the "Thai Buddhist" calendar.

And no one called me on it, either. Lucky me....

Well, I'll tell you.

It's 365.

Yes, 365.

Apparently, while Windows was wise enough to call this calendar CAL_THAI while it was thinking about the Thai Solar calendar (used since the end of the 1800s for most civil matters), the .Net Framework has been calling this the ThaiBuddhistCalendar class since it began its life in the early days of this century. Despite the fact that it has pretty much no connection whatsoever to the Buddhist Calendar that makes up the Thai Lunar (aka Thai Buddhist) calendar used throughout various parts of Southast Asia.

I guess no one really noticed that one before....

Though perhaps it would make a nice KB article now!

And perhaps some fixes in .Net in the future?

I suppose it's just a name. But sort of an embarrassing one. How'd we miss that one?

I'll bet they were wishing they had some constants they could deprecate and replace with the right ones, huh? Win32 has its advantages! :-)

ErikF on 2 Aug 2011 4:01 PM:

Don't worry: you can still make it work by redefining how many hours there are in a day! ;-)

Michael S. Kaplan on 2 Aug 2011 4:14 PM:

Changing every year? Ouch!

ErikF on 2 Aug 2011 5:28 PM:

Sure! This way Microsoft will be ahead of the pack when we colonize Mars! Programmers have been far too lazy in assuming that their software will only run on Earth. Also, everyone assumes that time only runs forwards. At this rate, Raymond's time machine will have to run on some other operating system that works with non-linear time! :-P

referenced by

2011/12/28 I won't Dari or double Dari you to knock our Persian calendar support...

2011/08/03 Avoiding our Office moment (when we can!)

go to newer or older post, or back to index or month or day