__no_lead_zeros
global · crt
- Address
0xcf7288· 4 bytes, up to0xcf728b- Type
int32_t- Meaning
- Holds whether __store_num writes a number's own digits instead of a padded count
- Confidence
- verified, proof one
- Finding
- crt/time#number-conversions
Finding: Number conversions in crt: calendar time
Each number conversion copies the # mark into __no_lead_zeros and writes through
__store_num with a digit count. The arithmetic is signed. The week is 0 while tm_yday is below
the first day's index, tm_wday for U and for W tm_wday − 1 with Sunday 6, else
tm_yday / 7, plus 1 when tm_yday mod 7 is not below the index.
| conversion | number | digits |
|---|---|---|
d | tm_mday | 2 |
H | tm_hour | 2 |
I | tm_hour mod 12, 12 for 0 | 2 |
j | tm_yday + 1 | 3 |
m | tm_mon + 1 | 2 |
M | tm_min | 2 |
S | tm_sec | 2 |
U, W | the week | 2 |
w | tm_wday | 1 |
y | tm_year mod 100 | 2 |
Y | (tm_year / 100 + 19) · 100 + tm_year mod 100 | 4 |
The derivation is in the doc.