Bug 198553

Summary: nl_langinfo() and strftime() now supports alternative month names
Product: Documentation Reporter: Rafal Luzynski (digitalfreak)
Component: man-pagesAssignee: documentation_man-pages (documentation_man-pages)
Status: NEW ---    
Severity: normal CC: piotrdrag
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Rafal Luzynski 2018-01-22 23:26:21 UTC
I'd like to notify you that today some changes have been introduced to nl_langinfo() and strftime() families. The changes are:

nl_langinfo() now supports ALTMON_{1–12} which returns the name of the n-th month in the grammatical form required when the month is named by itself. For now this should be treated as the GNU extension although it has been accepted by POSIX as the future change. Also the same implementation has existed in BSD family since 1990s.

It has been specified that the existing MON_{1-12} and ABMON_{1-12} return the name of the n-th month (full and abbreviated, respectively) in the grammatical form required when the month is used as part of a complete date.

Note that _NL_ABALTMON_{1-12} has been also added but it should be treated as undocumented.

strftime(): there are new format specifiers: %OB, %Ob, and %Oh. %OB returns the same month name as nl_langinfo(ALTMON_{1-12}); %Ob returns the same month name as nl_langinfo(_NL_ABALTMON_{1-12}); %Oh is an equivalent to %Ob. Also, as previously: %B returns the same month name as nl_langinfo(MON_{1-12}); %b returns the same month name as nl_langinfo(ABMON_{1-12}); %h is an equivalent to %b. No change here.

strptime(): accepts the new format specifiers: %OB, %Ob, %Oh. Along with the existing %B, %b, and %h they parse any form of the month name: full or abbreviated, primary or alternative.

There are about 20 languages which require the month name in the genitive case when used in a full date but in the nominative case when used standalone. For other languages there is no difference between the primary and alternative month names.

Please reflect these changes in the man pages. Feel free to ask me the questions. Sorry for no patch but I think that as a non-English native speaker I will not write a perfect documentation and it will need fixes anyway.

Links:

https://sourceware.org/bugzilla/show_bug.cgi?id=10871
http://austingroupbugs.net/view.php?id=258
http://austingroupbugs.net/view.php?id=1166
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;hb=HEAD