Skip to content

Implementations

Six implementations, each developed clean-room against the conformance vectors; built from the prose and vectors alone, with every divergence between them resolved as a spec fix and a new vector. All zero-dependency. The Rust core additionally ships as a WASM package for browsers and JS runtimes.

They share one API vocabulary; operation names are fixed as words (covers, covers in, to rrule) and rendered in each language’s casing convention. Learn one library and you know them all.

LanguagePackageInstallRequires
TypeScript / JavaScript (reference)dtrexp on npmnpm i dtrexpNode.js ≥ 22
WebAssembly (the Rust core)dtrexp-wasm on npmnpm i dtrexp-wasmany modern browser or JS runtime
Pythondtrexp on PyPIpip install dtrexpPython 3.11+
Godtrexp-go via the Go proxygo get github.com/DTRExp/dtrexp-goGo 1.26+
Rustdtrexp on crates.iocargo add dtrexpRust 2021 edition
Swiftdtrexp-swift via SwiftPM.package(url: "https://github.com/DTRExp/dtrexp-swift", from: "1.0.0")Swift 6.0+
Javadtrexp-java, from source./run.sh (planned coordinate: io.onury:dtrexp)Java 17+

Each language has its own page with install, worked examples and the full member table:

  • JavaScript / TypeScript (dtrexp-js) — the reference implementation. TypeScript, ESM, zero runtime dependencies.
  • WASM (dtrexp-wasm) — the Rust core via wasm-bindgen; ~63 KB wasm, ~29 KB gzipped, instantiates at import. IANA zones come from the host’s Intl data, so no timezone database is bundled.
  • Python (dtrexp-py) — stdlib only; zoneinfo for IANA zones.
  • Go (dtrexp-go) — stdlib only; time for IANA zones.
  • Rust (dtrexp-rs) — no dependencies, including the zone handling; IANA zones are read straight from the system TZif database.
  • Swift (dtrexp-swift) — Foundation only; TimeZone and Date for zones and instants.
  • Java (dtrexp-java) — pure Java 17+, zero dependencies; java.time for IANA zones. Not on Maven Central yet.

Building your own? Start from the library interface and wire in the vectors; an implementation that passes vectors.json is a conforming DTRExp implementation, whatever its internals look like.