I wanted to address the "locale-independent" specifications.
The %O are an opt-in into the locale alternative numeral system.
You might want to have dates with arabic numerals and names in hindi, for example.
so "1 AM" can be either "१ पूर्वाह्न", or " 1 पूर्वाह्न," depending on whether you want to use the devanagari numerals or not.
See also
alt_digitsDefine alternative symbols for digits, corresponding to the %O modified conversion specification. [...] The %O modifier shall indicate that the string corresponding to the value specified via the conversion specification shall be used instead of the value.The way this is handled by CLDR ( and therefore most PL), is that the desired numbering system is attached to the locale name, or is provided as part of supplementary options
Here is an example using javascript (tested locally with node)
<image.png>
Notice that
- The concern of numeral system vs formatting is separate
- Most locales defaults to latin number ( but not arabic in this example), I am not exactly sure why
- Few programming languages offer a per specifier choice of numbering systems, these things are not usually mixed.
Now whether the %O specifier of POSIX makes sense or not is an interesting question, but I wanted to point out they are no less or more depending on locale than other specifiers.
{:L%u} formats a week day number using the locale primary numeral system
{:L%Ou} formats a week day number using the locale alternative numeral system
What if you pass the C locale ?
Well, the C locale numeral primary system is arabic numbers, it does not have an alternative numeric system
In all cases, It does what it says it does
Sorry I didn't catch that concern during the meeting.
I hope you will reconsider the second poll as we clearly missed some pretty critical information!
PS:
You will notice that this brings more questions than it answers.
What if the globale locale uses a non-arabic numeral system? What is the default numeral system? Why is there a primary and alternative. What if you need a third?
Why does time formatting care about that when none of the other locale facilities seem to?
But this is clearly out of scope of this issue!
More reference