Title
Unnecessary restriction on '%p' parse specifier
Status
c++20
Section
[time.parse]
Submitter
Tomasz Kamiński

Created on 2019-07-31.00:00:00 last changed 45 months ago

Messages

Date: 2019-08-17.17:28:18

Proposed resolution:

This wording is relative to N4830.

  1. Modify Table 99 "Meaning of parse flags [tab:time.parse.spec]" in [time.parse] as indicated:

    Table 99: Meaning of parse flags [tab:time.parse.spec]
    Flag Parsed value
    […]
    %p The locale's equivalent of the AM/PM designations associated with a 12-hour clock. The command %I must precede %p in the format string.
    […]
Date: 2019-08-17.00:00:00

[ 2019-08-17 Issue Prioritization ]

Status to Tentatively Ready and priority to 0 after eight positive votes on the reflector.

Date: 2019-07-31.00:00:00

The current specification for the '%p' flag in "[tab:time.parse.spec] Meaning of parse flags" places a restriction of it's placement with regards to the '%I' command:

The locale's equivalent of the AM/PM designations associated with a 12-hour clock. The command %I must precede %p in the format string.

This restriction makes the migration to new API more difficult, as it is not present for the POSIX strptime nor in the example implementation of the library. Per Howard's comment:

Actually this is an obsolete requirement and it should be struck. The first time I implemented this I didn't know how to do it without this requirement. I've since reimplemented it without needing this.
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-08-17 17:28:18adminsetmessages: + msg10565
2019-08-17 17:28:18adminsetstatus: new -> ready
2019-08-03 18:17:27adminsetmessages: + msg10536
2019-07-31 00:00:00admincreate