Artifact 9cde80b3ed898dcba8337d40abb994b4039b8353:
- File bindings/s2/unit2/000-075-time.s2 — part of check-in [fdc5e1014e] at 2021-02-11 12:42:23 on branch trunk — Moved C++ and s2 bindings to bindings/{cpp,s2}. Got the C++ bindings compiling for new gcc breakage and new, stricter T-card validation. (user: stephan size: 685)
- File s2/unit2/000-075-time.s2 — part of check-in [f063fd4f0f] at 2021-02-08 06:15:57 on branch trunk — Updated s2 and brought old fossil bindings up to date wrt cwal/s2 changes made since then. Core s2 unit tests are inexplicably failing with a bogus(?) OOM report with this shell build, but they work in the core s2 tree and libf unit tests are passing. (user: stephan size: 685)
scope { const tm = Fossil.time; var n = tm.now(); var j = tm.unixToJulian(n); //print(n, tm.julianToUnix(j)); //assert n === tm.julianToUnix(j) /* sometimes fails on rounding errors! Soo.... */; 0.prototype.'operator=~' = proc(r){ affirm 'integer' === typename r; return (this===r) || (this===(r-1)) || (this===(r+1)); }; assert n =~ tm.julianToUnix(j) /* round-trip sometime rounds badly, so we check for a +/-1 match */; unset n.prototype.'operator=~' /* avoid polluting downstream script code */; assert 19 === tm.julianToISO8601(j).length() /* w/o ms */; assert 23 === tm.julianToISO8601(j,true).length() /* w/ ms */; }