Created on 2023-12-08.00:00:00 last changed 7 days ago
Proposed resolution:
This wording is relative to N5014.
Modify [time.format], Table 133 [tab:time.format.spec], as indicated:
Table 133 — Meaning of conversion specifiers [tab:time.format.spec] Specifier Replacement […] %C The year divided by 100 using floored division. If the result is a single decimal digit, it
is prefixed with 0
in the range [-9, 9] then 0 is inserted before the single digit (after the sign, if present).
The modified command %EC produces the locale's alternative
representation of the century.[…]
[ 2025-10-17; Jonathan provides new wording based on Option B ]
[ 2025-10-17; Reflector poll. ]
Set priority to 3 after reflector poll.
Howard intended Option B, i.e. `"-09"`, but Option B could possibly be interpreted to mean `"0-9"`. "Maybe something like the 0 is inserted before the sole digit, or after the sign, if any."
This wording is relative to N4964.
[Drafting Note: Two mutually exclusive options are prepared, depicted below by Option A and Option B, respectively.]
Option A:
Modify [time.format], Table 101 [tab:time.format.spec], as indicated:
Table 101 — Meaning of conversion specifiers [tab:time.format.spec] Specifier Replacement […] %C The year divided by 100 using floored division. If the result is a single decimal digitin range [0, 9], it
is prefixed with 0. The modified command %EC produces the locale's alternative
representation of the century.[…]
Option B:
Modify [time.format], Table 101 [tab:time.format.spec], as indicated:
Table 101 — Meaning of conversion specifiers [tab:time.format.spec] Specifier Replacement […] %C The year divided by 100 using floored division. If the result is a single decimal digitin range [-9, 9], it
is prefixed with 0. The modified command %EC produces the locale's alternative
representation of the century.[…]
Table 101, [tab:time.format.spec] reads:
| Specifier | Replacement |
|---|---|
| […] | |
| %C | The year divided by 100 using floored division. If the result is a single decimal digit, it is prefixed with 0. The modified command %EC produces the locale's alternative representation of the century. |
| […] | |
When the year is in range [-99, -10], it is unclear whether the result (in range [-9, -1]) is considered as a single decimal digit, and there is implementation divergence (llvm/llvm-project#74727).
Daniel: This issue is somewhat related to LWG 3831.| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-10-17 13:06:28 | admin | set | messages: + msg15215 |
| 2025-10-17 12:42:49 | admin | set | messages: + msg15210 |
| 2023-12-09 16:07:14 | admin | set | messages: + msg13886 |
| 2023-12-08 00:00:00 | admin | create | |