Dates, etc.

Well, this is somewhat of an unholy mess. I whipped up a quick date format comparator for glibc and icu for glibc’s supported locales and dispiritingly very few locales agree as to the short date format between icu, glibc, etc. To take one off the top, that of af_ZA

glibc: af_ZA.utf8: %x is 03/09/2009
icu 4.2: af_ZA: Short date is 2009-09-03
CLDR: af: date-short is 2009/09/03
OOo: Afrikaans (South Africa) 09/09/03

rats :-(

Default icu rules seem (?) to get generated from CLDR and checked into icu, but these appear to be out of sync with the current CLDR version. e.g. some tools to get regenerate the icu data from CLDR. Need to have a look to see if that’s truly the case.

3 Responses to “Dates, etc.”

  1. Caolan says:

    MS has Afrikaans default short date format as the same as CLDR 1.7, i.e. 2009/09/03

    Front page of Beeld is using 03-09-2009

    South African Tax Forms are using 2009-09-03

  2. Those poor kids with surnames like Abbot, they get picked on first for English orals! So with a language like Afrikaans I get picked on (I maintain a lot of these locales).

    I’m really glad you’ve done this. When we did our initial CLDR to OOo alignment it exposed a number of bugs that we were able to correct. So exercises like this that expose inconsistencies, while they might be tedious to execute, are really important to get locale data in good shape. Many thanks!

    It seems that the whole date thing needs a nice review and it looks like I’ll be doing that for all _ZA languages.

  3. Caolan says:

    Turns out that icu 4.2 and CLDR 1.7 are kept in sync. Just that icu ignores unconfirmed fields and uses defaults in that case, i.e. 2009/09/03 is an unconfirmed date format for Afrikaans, so icu ignores it and falls back to the ISO standard format.

Leave a Reply