It can be custom OR it can be internationally appropriate

by Michael S. Kaplan, published on 2006/01/13 03:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/01/13/512390.aspx


I think the title says it best -- you can make it something custom OR you can make it internationally appropriate. But you really can't do both.

The other day someone asked about supporting several custom formats for a calendar, such as ones with month and year, ones with month and date, ones with the long date minus day names, ones with the long date minus the year, and so on.

Now I am sure you would agree that it is easy to imagine circumstances under which each of these could be useful, right?

And as you look at the date formats for any particular locale it is reasonable to make an educated guess on how you take the existing formats and apply their pattern to one of the alternate ones, right?

Unfortunately, there is no way to so consistently across all locales in an automated fashion -- there will always be exceptions that can trip you up.

And even if you sign yourself up to do them all manually and try use logic to build them all up, it is in the end only a guess.

Because in the end, the only way to know what people would want for a particular type of format is to ask them. So you really need to either work with the existing formats that have gone through such a review, or do some custom formatting. There really is no way to do both and know whether users in a given locale will accept the guess.

(Of course there is a third option that will take a bit more time -- request for new formats to be added in future versions of Windows and the .NET Framework!)

By the way, I just noticed it is Friday the 13th. It might be a good day to be in a locale that is not superstitious....

 

This post brought to you by "" (U+65e5, a CJK Ideograph meaning day or daytime)


# Universalis on 13 Jan 2006 6:33 AM:

In Spain and Italy, it's Tuesday the 13th that you need to worry about.

BOOL WINAPI IsDayInauspicious(LCID,SYSTEMTIME);

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.

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