Title
Format specifier %y/%Y is missing locale alternative versions
Status
c++20
Section
[time.parse]
Submitter
Tomasz Kamiński

Created on 2019-06-29.00:00:00 last changed 38 months ago

Messages

Date: 2019-07-23.15:26:26

Proposed resolution:

This wording is relative to N4820.

[Drafting note: For the '%Oy' specifier we preserve consistency with the current specification for '%Od' and '%Oe' from Table 87 "Meaning of format conversion specifier" [tab:time.format.spec]:

  1. %d […] The modified command %Od produces the locale's alternative representation.

  2. %e […] The modified command %Oe produces the locale's alternative representation.

as their corresponding POSIX specification is matching one for '%Oy':

  1. %Od Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading zeros if there is any alternative symbol for zero; otherwise, with leading <space> characters.

  2. %Oe Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading <space> characters.

]

  1. Modify "Table 87 — Meaning of format conversion specifiers" [tab:time.format.spec] as indicated:

    Table 87 — Meaning of format conversion specifiers [tab:time.format.spec]
    Specifier Replacement
    […]
    %y The last two decimal digits of the year. If the result is a single digit it is prefixed by 0. The modified command %Oy produces the locale's alternative representation. The modified command %Ey produces the locale's alternative representation of offset from %EC (year only).
    %Y The year as a decimal number. If the result is less than four digits it is left-padded with 0 to four digits. The modified command %EY produces the locale's alternative full year representation.
    […]
Date: 2019-08-23.18:06:54

[ 2019-07 Issue Prioritization ]

Status to Tentatively Ready after five positive votes on the reflector.

Date: 2019-06-29.00:00:00

The year format specifier ('y', 'Y') are missing the locale alternative version ('%EY', '%Ey' and '%Oy'). That makes it inconsistent with the POSIX strftime specification:

  1. %Ey Replaced by the offset from %EC (year only) in the locale's alternative representation.

  2. %EY Replaced by the full alternative year representation.

  3. %Oy Replaced by the year (offset from %C) using the locale's alternative numeric symbols.

and parse specifiers [time.parse] that accepts these modified command.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2019-11-19 14:48:30adminsetstatus: voting -> wp
2019-10-07 02:48:00adminsetstatus: ready -> voting
2019-07-23 15:26:26adminsetmessages: + msg10511
2019-07-23 15:26:26adminsetstatus: new -> ready
2019-06-30 18:42:53adminsetmessages: + msg10473
2019-06-29 00:00:00admincreate