From 60a043d5603231e837c5f649f5d7f899f31fdb42 Mon Sep 17 00:00:00 2001 From: Dylan Pulver Date: Fri, 4 Sep 2026 00:18:04 +0300 Subject: [PATCH] Remove the '0' chrono padding modifier from the docs 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: Claude --- doc/syntax.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/syntax.md b/doc/syntax.md index 9df3cd93e215..b5b01dabc748 100644 --- a/doc/syntax.md +++ b/doc/syntax.md @@ -300,7 +300,7 @@ chrono_specs ::= conversion_spec | chrono_specs (conversion_spec | literal_char) conversion_spec ::= "%" [padding_modifier] [locale_modifier] chrono_type literal_char ::= <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.