days_from_civil
std.elementwise.days_from_civil · Level L4Days since 1970-01-01 for a date of the proleptic Gregorian calendar, by Howard Hinnant's algorithm: the year is counted from March, so the leap day falls last, and every division is a floor.
Signature
days_from_civil(year: i64[n], month: i64[n], day: i64[n]) → i64[n]
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Equal to the reference
(date(year, month, day) - date(1970, 1, 1)).daysin exact rational arithmetic, on all 40 test cases. - All 174 int64 results are exact: the error is zero.
- Interpreter and NumPy backend return bit-identical results.
- correctly rounded (the int64 nearest the exact value)
- 100%
- bit-equal to the NumPy formula in int64
- 100%
- largest error, in units in the last place
- 0
Note
The reference is Python's own datetime, a different implementation, over years 1–9999.
Identity
sha256:adaa82e9d68f92decc57b0ef39e5bdf4fc1c72760b6e9408472193eb96d23c3fThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.elementwise.days_from_civil · Ω:days_from_civil
- Pins
sha256:6f631bf4e2d8b15eaab855a06081ae57ad32e708337ad1c6a62e414a773f4ff9this graph alone- Evidence
sha256:161cabc0b29b991fe3c77721b2dba06eac212fe86cbddc4adb44a908a74c7008the hash of its verification record- Needs
- no capability: a pure function
Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.