Brad Arant 8b2391b289 Implement datediff(a, b)
Parsed its arguments correctly but had an empty body (a literal
"// TODO: Implement DATEDIFF." comment), never setting a result - isNumber
was left uninitialized on this path.

Matches MySQL's own DATEDIFF(expr1, expr2): expr1 - expr2 expressed as a
whole number of days, ignoring time-of-day. Dates parse as YYYY-MM-DD via
strptime (a longer "YYYY-MM-DD HH:MM:SS" value parses fine too, since
strptime only consumes what the format string asks for) and are
interpreted as UTC via timegm() rather than mktime(), so the result
doesn't shift with the server's own timezone. An unparseable date throws
a clear, specific error instead of producing garbage.

Verified via real jet-2.0 runs: datediff('2026-08-26','2026-08-20') -> 6,
the reverse -> -6, same date -> 0, a full non-leap year -> 365, and an
invalid date string throws cleanly rather than crashing or silently
returning nonsense. Full 9-script regression suite still passes.
2026-08-26 10:50:57 -07:00
2024-12-02 15:46:49 -08:00
2025-05-06 07:33:04 -07:00
2025-05-06 07:33:04 -07:00
2025-01-09 07:49:11 -08:00
2025-02-07 19:29:18 -08:00
2025-02-07 19:29:18 -08:00
2025-12-09 12:29:39 -08:00
2025-01-09 08:02:38 -08:00
2025-01-09 08:02:38 -08:00
2025-02-07 16:10:13 -08:00
2025-11-21 19:15:48 -08:00
2025-11-21 19:15:48 -08:00
2026-08-26 10:50:57 -07:00
2025-12-04 17:05:57 -08:00
2025-05-06 07:33:04 -07:00
2025-11-21 19:15:48 -08:00
2025-11-21 19:15:48 -08:00
2025-11-21 19:15:48 -08:00
2025-11-21 19:15:48 -08:00
2025-11-21 19:15:48 -08:00
2025-11-21 19:15:48 -08:00
S
Description
JET 2.0 core library.
40 MiB
0 Stars 0 Watchers 0 Forks
Languages
HTML 50.2%
TeX 18.7%
C++ 15%
JavaScript 7.5%
CSS 4.4%
Other 4.2%