Skip to content

Round-Trip Verification

What These Tests Are For

This is a correctness harness that happens to produce timings: every calendar engine round-trips ISO to calendar and back to ISO for every third day from 1800 to 3000 CE — 146,219 conversions per calendar — and the identity must hold across every leap month, era boundary, and calendar quirk in that range. The timing is a byproduct; the zero-failure column is the point.

This test is designed for round-trips to ensure correctness and verify that zdate performs properly. It is not an accurate measurement of one library being faster than another. From other internal performance tests zdate has run, there are areas where each library outperforms the other — but in all cases the differences are not noticeable in real application use cases.

Results

Draft

Insert the current table here when publishing: one row per calendar — samples, failures, milliseconds — with runtime name, version, and date pinned above the table. Pair runtimes when comparing (zdate and Temporal in the same runtime, per row). Temporal implementations are young and will improve; a pinned, dated table stays honest as they move.

All 18 engines complete the range with zero failures.

Two calendars in the tested Temporal implementations (Chrome, Edge, Firefox, Node) currently reject islamic and islamic-rgsa as calendar identifiers; zdate implements both. You can verify this in a REPL in under a minute.

On Performance

Performance is not a differentiator. Benchmarks may favor zdate on most calendars, but real-world usage — clustered in a narrow year range, few conversions — doesn't expose the difference. Both libraries are imperceptibly fast for typical applications. Choose on other criteria: bundle size (native Temporal is 0), API surface, personal taste, or runtime consistency.

What the numbers are allowed to claim: zdate's calendar math is fast enough that owning 18 engines costs nothing at application scale, and the engines are correct across twelve centuries of edge cases. That is the claim the harness was built to defend.