|Anonymous | Login||2021-05-08 06:57 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001166||[1003.1(2016/18)/Issue7+TC2] System Interfaces||Comment||Enhancement Request||2017-10-27 20:11||2020-04-27 10:44|
|Priority||normal||Resolution||Accepted As Marked|
|Final Accepted Text||See Note: 0004237.|
|Summary||0001166: Case variants needed for strftime %b as well as %B|
|Description||In the process of implementing the resolution to defect #258 <http://austingroupbugs.net/view.php?id=258> [^] in the GNU C Library, we have found that case variants are needed for abbreviated month names (%b) as well as full month names (%B). For example, in Russian the name of the fifth month is май, which is only three letters, so it doesn't change when abbreviated, and the abbreviation declines just like the full noun (май nominative, мая genitive).|
Make parallel changes for %b as were accepted for %B in #258. Suggested edits (these assume that the edits in #258 have already been applied):
Locale Sec 126.96.36.199 LC_TIME Locale Definition, at the end of the specification of the "abmon" keyword, add: For languages having both a genitive (when used with a day number) and a nominative (no day number) case, this operand shall be used to denote the genitive case.
Locale Sec 188.8.131.52 LC_TIME Locale Definition, after the specification of the "abmon" keyword, insert:
ab_alt_mon Define the abbreviated month names, corresponding to the %Ob conversion specification. The operand shall consist of twelve <semicolon>-separated strings, each surrounded by double-quotes. The first string shall be the abbreviated name of the first month of the year (January), the second the abbreviated name of the second month, and so on. For languages having both a genitive (when used with a day number) and a nominative (no day number) case, this operand shall be used to denote the nominative case.
Locale Sec 184.108.40.206 LC_TIME C-Language Access, after the specification of ABMON_x, insert:
ABALTMON_x The alternative abbreviated month names (for example, Jan), where x is a number from 1 to 12.
Locale Sec 220.127.116.11 LC_TIME Category in the POSIX Locale, after the "abmon" entries in the table, add these entries:
ab_alt_mon ABALTMON_1 %Ob N/A
ab_alt_mon ABALTMON_2 %Ob N/A
ab_alt_mon ABALTMON_3 %Ob N/A
ab_alt_mon ABALTMON_4 %Ob N/A
ab_alt_mon ABALTMON_5 %Ob N/A
ab_alt_mon ABALTMON_6 %Ob N/A
ab_alt_mon ABALTMON_7 %Ob N/A
ab_alt_mon ABALTMON_8 %Ob N/A
ab_alt_mon ABALTMON_9 %Ob N/A
ab_alt_mon ABALTMON_10 %Ob N/A
ab_alt_mon ABALTMON_11 %Ob N/A
ab_alt_mon ABALTMON_12 %Ob N/A
Locale Sec 7.4.2 Locale Grammar, to the "time_keyword_name" production add:
langinfo.h, in the table of symbolic constants with type nl_item, after ABMON_12 add:
ABALTMON_1 LC_TIME Abbreviated alternative name of the first month of the year.
ABALTMON_2 LC_TIME Abbreviated alternative name of the second month.
ABALTMON_3 LC_TIME Abbreviated alternative name of the third month.
ABALTMON_4 LC_TIME Abbreviated alternative name of the fourth month.
ABALTMON_5 LC_TIME Abbreviated alternative name of the fifth month.
ABALTMON_6 LC_TIME Abbreviated alternative name of the sixth month.
ABALTMON_7 LC_TIME Abbreviated alternative name of the seventh month.
ABALTMON_8 LC_TIME Abbreviated alternative name of the eighth month.
ABALTMON_9 LC_TIME Abbreviated alternative name of the ninth month.
ABALTMON_10 LC_TIME Abbreviated alternative name of the tenth month.
ABALTMON_11 LC_TIME Abbreviated alternative name of the eleventh month.
ABALTMON_12 LC_TIME Abbreviated alternative name of the twelfth month.
strftime, in the list of conversion specifiers, after 'b' insert
Ob Replaced by the locale’s abbreviated alternative month name.
strptime, in the list of conversion specifiers, replace the definitions of 'b', 'B', and 'OB' with:
b The month, using the locale's month names; either the abbreviated or full version of either the default or the alternative month name may be specified.
B Equivalent to b.
Ob Equivalent to b.
OB Equivalent to b.
Also add immediately below 'h':
Oh Equivalent to b.
XSH date, section "modified conversion specifications", insert after "alt_mon":
XSH date, in the table of modified conversion specifiers, insert at an appropriate place:
%Ob The locale’s abbreviated alternative month name.
|While a corner case, I agree for thoroughness this has merit. Additionally, having %Od and %OD so both %b and %Ob forms, or respectively %B and %OB with %D and %OD, may be accessible for the full date usages appears warranted. A way to test whether alternate forms are present in an active locale should also be documented for langinfo() for these specifiers, rather than require existing locales to all add dummy settings for these.|
> rather than require existing locales to all add dummy settings for these
I didn't find a good place to add it to the spec, but what we are doing about this in glibc is, our version of the localedef utility will set the altmon/abaltmon strings equal to the mon/abmon strings if they aren't specified in a definition file.
|The text may be in the standard already somewhere, about defaulting for other %O types and testing them. I added that to make sure it doesn't get overlooked. Some may prefer they default to empty strings, rather than be copies, as a design consideration too.|
Don Cragun (manager)
The standard does not speak to this issue, and as such no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.
The locale specification is believed to be incomplete.
Notes to the Editor (not part of this interpretation):
Make the changes in the desired action, but with CX shading on the strftime() addition. Also add CX shading to the strftime() addition from bug 0000258.
|Interpretation proposed: 7 Feb 2019|
|Interpretation approved: 17 April 2019|
|WG14 have agreed to include equivalent changes in C2X. Perhaps this should be noted in "Future Directions"?|
When applying this bug, I noticed that some of the changes were specified in the wrong place. Since the stated intention was for the %b changes to be "parallel" with those for %B, I have made the changes in the same places as those in bug 0000258.
ab_alt_mon was added to time_keyword_opt, not to time_keyword_name,
Also, the changes for the date utility were not needed, since bug 0000466 replaced the conversion specifiers list with a reference to strftime.
|2017-10-27 20:11||zackw||New Issue|
|2017-10-27 20:11||zackw||Name||=> Zack Weinberg|
|2017-10-27 20:11||zackw||Section||=> strftime|
|2017-10-27 20:11||zackw||Page Number||=> ?|
|2017-10-27 20:11||zackw||Line Number||=> ?|
|2017-10-27 21:02||shware_systems||Note Added: 0003872|
|2017-10-27 21:24||zackw||Note Added: 0003873|
|2017-10-27 22:53||shware_systems||Note Added: 0003874|
|2019-01-31 16:31||nick||Relationship added||related to 0000258|
|2019-01-31 17:08||Don Cragun||Note Added: 0004237|
|2019-01-31 17:09||Don Cragun||Interp Status||=> Pending|
|2019-01-31 17:09||Don Cragun||Final Accepted Text||=> See Note: 0004237.|
|2019-01-31 17:09||Don Cragun||Status||New => Interpretation Required|
|2019-01-31 17:09||Don Cragun||Resolution||Open => Accepted As Marked|
|2019-01-31 17:10||Don Cragun||Tag Attached: c99|
|2019-01-31 17:10||Don Cragun||Tag Attached: issue8|
|2019-02-07 17:18||agadmin||Interp Status||Pending => Proposed|
|2019-02-07 17:18||agadmin||Note Added: 0004244|
|2019-04-17 10:52||agadmin||Interp Status||Proposed => Approved|
|2019-04-17 10:52||agadmin||Note Added: 0004367|
|2019-05-02 13:01||nick||Note Added: 0004381|
|2020-04-27 10:44||geoffclare||Note Added: 0004831|
|2020-04-27 10:44||geoffclare||Status||Interpretation Required => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|