Jiff 1.0 Freezes Its API, Putting a Rust Datetime Library Beside Chrono
Software / news
Jiff 1.0 Freezes Its API, Putting a Rust Datetime Library Beside Chrono
The release post commits to the 1.0 interface indefinitely and names uv, Cargo, Starship and Nushell among the projects already using it.
Jiff, a datetime library for Rust, reached version 1.0 on Nov. 15, with a promise on its release post that the API will stay put. "Unless some significant defect is found in Jiff's API, my plan is to commit to Jiff 1.0 indefinitely," the post says.
The post, published on burntsushi.net, says Jiff is meant to appear in other libraries' public signatures, which makes a breaking change expensive for everyone downstream. It lists uv, Cargo, Starship, fd, Nushell, mise, Jujutsu and uutils/coreutils as production users, and says Jiff is the basis of a Temporal implementation in AWS LLRT.
What the 1.0 API contains
Time zones sit at the centre of the design. The post describes an "onion" of types: civil::Date, civil::Time, civil::DateTime, Timestamp, TimeZone and ZonedDateTime. Each layer adds one piece of context to the one below it.
Durations come in two kinds. Span holds calendar units such as months, and SignedDuration holds physical time only, stored as a 96-bit nanosecond count. The post's worked example is a 25-hour day in New York on 2024-11-03, when clocks fall back.
Ambiguous local times, the hour that happens twice or not at all, are resolved with one of four strategies: "compatible", "earlier", "later" or "reject". Parsing covers RFC 3339, RFC 9557, ISO 8601 and RFC 2822, plus POSIX-style strptime and strftime.
Where it stops
The post lists its own limits. Jiff supports "+/- 9999" years and, in its words, "doesn't support any calendars other than the proleptic Gregorian calendar." Locale-aware formatting and other calendars come through ICU4X and a separate jiff-icu crate.
The post says Jiff is "heavily inspired" by JavaScript's Temporal proposal, and it renames several of its terms. Temporal's Duration is Span in Jiff, Instant is Timestamp, and "plain" types are "civil" ones.
The post does not state Jiff's license or a minimum supported Rust version. The Jiff repository fills both in: dual-licensed under MIT or the Unlicense, with an MSRV of 1.85.0.
How it compares with chrono
The author's reason for a new crate is that the APIs of chrono and the time crate felt confusing, and that by 2024 they had reached a "local maximum". The chrono repository shows a library with more stars and a far older compiler floor.
| Jiff | chrono | |
|---|---|---|
| Stars on GitHub | about 3.0k | 3.9k |
| Minimum Rust version | 1.85.0 | 1.62.0 |
| Open issues | 11 | 158 |
| Time zone data | Reads /usr/share/zoneinfo on Unix, embeds a copy on Windows | Not shipped; needs the Chrono-TZ crate |
The table is a snapshot of two GitHub pages read on Nov. 16, not a measure of quality. Open-issue counts in particular say more about a project's age and size than its health.
The tradeoff for a Rust 1.85.0 floor is that projects pinned to older toolchains cannot adopt Jiff yet. Chrono's 1.62.0 floor is still tested in CI, according to its README, which says it "may be bumped in minor releases".
What to watch
The Jiff repository's Releases section is empty, so the tagged 1.0 build is not visible there. The changelog linked from the post lists the breaking changes from 0.2 to 1.0, which is the document to read before upgrading a crate that exposes Jiff types.
For Python readers, the same maintenance pressure shows up in tools like Gawain, and uv's supply chain is the subject of PyPI's new attestation tab. The next test of the promise is the first project that publishes a type from Jiff 1.0 in its own public API.
Sources
More in Software
- 01Levien's Next-100 Rust GUIs Post Counts About 20 New Toolkits and Bets Against egui's Immediate ModeThe Linebender author credits AI rewrites for the surge; egui's own README concedes the trade-off he is pressing on.
- 02C++26 Is Reopened: The 13–9–12 Ballot, the Enforced Label That Answers It, and What Is Still OpenSutter's Búzios report says the committee kept contracts, added one paper, and will send C++26 to a second ballot with no published date.
- 03OpenAI Says Codex Cannot Run in Docker for iOS Builds, and Docker Launches It With Codex's Sandbox OffBolin's November 18 post lists Seatbelt, Bubblewrap and MXC as Codex's three sandboxes; Docker's page defaults to --dangerously-bypass-approvals-and-sandbox.
- 04CLI-Anything Has 62,119 Stars and a README With Three Different Test TotalsThe HKUDS project turns desktop software into agent-callable CLIs; its own per-harness lines sum to 158 more tests than it reports.