fmtlib / fmt

A modern formatting library
https://fmt.dev
Other
20.56k stars 2.46k forks source link

Add support for alternative month format #3914

Closed Iamnotagenius closed 1 month ago

Iamnotagenius commented 6 months ago

In ru_RU.UTF-8 locale, there's a possibility to specify alternative month format. For example, specifying %B format, strftime will output this (providing that said locale is in charge): марта. It works well in scenarios like %d %B, which will result in 31 марта. However, strftime has support for %OB which will output Март with the russian locale. This will be more appropriate to use in formats like %OB %Y which results in Март 2024. It seems this functionality is not at all present in this library, when I try to format a date like %OB the library throws an invalid format exception.

vitaut commented 6 months ago

%OB seems non-standard: https://eel.is/c++draft/tab:time.format.spec. Where is it documented?

jmkuhn commented 5 months ago

Some discussions about standardizing this in C: https://www.austingroupbugs.net/view.php?id=1166 https://www.austingroupbugs.net/view.php?id=258

vitaut commented 1 month ago

Closing as there doesn't seem to be much interest but a PR would still be welcome.