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

Created on 2019-07-31.00:00:00, last changed 2019-08-03.18:17:27.

Messages

Date: 2019-08-03.18:17:27

Proposed resolution:

This wording is relative to N4820.

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

    Table 88: 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-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
2019-08-03 18:17:27adminsetmessages: + msg10536
2019-07-31 00:00:00admincreate