Calendars on Win32 -- Not all there yet

by Michael S. Kaplan, published on 2005/01/14 17:36 -05:00, original URI:

You can all really tell I like calendars on Win32, can't you? :-)

Well, if you are using the Gregorian calendar, then you have a good support story. You have full localization into every language. And I am not just talking about the Windows UI language list but every single locale on the system. And if you are willing to use a bit of COM you get good parsing support so you have as really good and full featured setup.

If you are using the Thai Buddhist calendar then you don't get localization other than Thai, but you probably did not need it anyway. And if you have an even remotely recent version of COM you even have that parsing support (though not in VB5 and VB6, I'll talk about that another time). So the story is not great but its pretty good.

If you are using the Hijri calendar then you get the parsing support in COM and it even works well in COM clients like VB5 and VB6. Unfortunately you also get no localization other than Arabic. Which is fine if you live in Saudi Arabia or other countries that are Arabic-speaking, but not as great if you are in the Maldives (since there is no Divehi localization).

Other calenders (Japanese Emporer, Taiwan, Korean Tangun Era) have no parsing support and no localization -- this is not as bad as it might be since it is most used by native speakers of the appropiate langauages. But it is still a little stifling. What is really needed is a sensible localization model for calendars that allows them to be localized when it is needed. Since every once in a while, it is....

You can just think of calendars as the vast underbelly/dark side of NLS!

This post brought to you by "۞" (U+06de, a.k.a. ARABIC START OF RUB EL HIZB)

# Adrian on 16 Jan 2005 3:01 PM:

> Other calenders (Japanese Emporer, Taiwan, Korean Tangun Era) have no parsing support.

I thought that VarDateFromStr() could handle Japanese dates and knew about the various eras, years of the Emperors and such like. Is this not the case, or are you using "parsing support" to mean something deeper than converting strings into DATE structures?

# Michael Kaplan on 16 Jan 2005 3:13 PM:

Well, I was actually limiting myself to the cases that had documented support. There is some xupport for parsing of other calendars in COM, but none of it is documented and only Hijri and Thau have explicit flags defined....

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2010/10/26 Note to the NLS API: It ain't ever gonna by 13 o'clock, either.

2010/02/22 Will someone take up the job of Calendar support in .Net, please?

2008/01/09 Oh (Saka to me, Saka to me, Saka to me, Saka to me) Whoa Babe (Just a little bit) A little respect (just a little bit)

2007/12/17 No good way to get one's Jalalis playing with calendars in Windows or .NET, really

2007/07/06 Upgrading the rank of the people we talk about calendars with

2005/12/02 Calendars in other languages

2005/10/20 Behold the PersianCalendar class

2005/03/28 The WinForms DateTimePicker and MonthCalendar do not support culture settings

2005/02/23 Calendars.NET -- new platform, new issues

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