Remove the '0' chrono padding modifier from the docs (#4917)

The '0' modifier was documented in ca8eeb09 (#3976) and the parser case for
it was removed nine days later in 7bd11b5c ("Remove a redundant extension to
reduce divergence from std::format"), which did not update the docs. Since
then the grammar and the modifier table have promised a modifier that
parse_chrono_format rejects with "invalid format", for all 11 of the
presentation types the same section lists as supporting it.

Zero padding remains the default, so the extension really was redundant;
this only aligns the documentation with the code.

Co-authored-by: Dylan Pulver <dylanpulver@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Dylan Pulver 2026-09-05 18:33:43 +03:00 committed by GitHub
parent de3660a745
commit a389757209
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -300,7 +300,7 @@ chrono_specs ::= conversion_spec |
chrono_specs (conversion_spec | literal_char)
conversion_spec ::= "%" [padding_modifier] [locale_modifier] chrono_type
literal_char ::= &lt;a character other than '{', '}' or '%'>
padding_modifier ::= "-" | "_" | "0"
padding_modifier ::= "-" | "_"
locale_modifier ::= "E" | "O"
chrono_type ::= "a" | "A" | "b" | "B" | "c" | "C" | "d" | "D" | "e" |
"F" | "g" | "G" | "h" | "H" | "I" | "j" | "m" | "M" |
@ -594,13 +594,13 @@ The available presentation types (*chrono_type*) are:
Specifiers that have a calendaric component such as `'d'` (the day of month)
are valid only for `std::tm` and time points but not durations.
The available padding modifiers (*padding_modifier*) are:
Numeric results are padded with zeros by default. The available padding
modifiers (*padding_modifier*) are:
| Type | Meaning |
|-------|-----------------------------------------|
| `'_'` | Pad a numeric result with spaces. |
| `'-'` | Do not pad a numeric result string. |
| `'0'` | Pad a numeric result string with zeros. |
These modifiers are only supported for the `'H'`, `'I'`, `'M'`, `'S'`, `'U'`,
`'V'`, `'W'`, `'Y'`, `'d'`, `'j'` and `'m'` presentation types.