benilla-re systems structs docs

__no_lead_zeros

global · crt

Address
0xcf7288 · 4 bytes, up to 0xcf728b
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.

conversionnumberdigits
dtm_mday2
Htm_hour2
Itm_hour mod 12, 12 for 02
jtm_yday + 13
mtm_mon + 12
Mtm_min2
Stm_sec2
U, Wthe week2
wtm_wday1
ytm_year mod 1002
Y(tm_year / 100 + 19) · 100 + tm_year mod 1004

The derivation is in the doc.