Need API to find out the hour cycle (h11, h12, h23, or h24) of a given locale
has the concept of "default hourCycle setting" of a given Locale.
The default hourCycle setting per locale (12.3.3)
Let hcDefault be dataLocaleData.[[hourCycle]].
We need an API to get such default hour cycle for a given Locale.
Mark - need more help here
hour in am/pm (1~12)
hour in day (0~23)
hour in day (1~24)
hour in am/pm (0~11)
$ egrep preferred third_party/icu/source/data/misc/supplementalData.txt|sort -u
show me only h or H, which mean either “hour in am/pm (1~12)” or “hour in day (0~23)”
but I don’t see any value of “k” or “K”.
so… is this true there are no locale prefer 1-24 (hc24) or 0-11 (hc11)?
or there are something else I need to look into?
The data is in CLDR as <timeData>, and copied into ICU data. So the implementation is fairly straightforward.
There are two pieces of information:
<hours preferred="H" allowed="H hb hB h" regions="AF LA"/>
allowed is in priority order
preferred is for backwards compatibility, when the client doesn't support *b or *B