Repository navigation
Display dates beyond jiff's range without panicking - #11187
Merged
Merged
Conversation
A `Date` accepts every `i32` day count and every `i64` millisecond count, but its `Display` panicked for a date that jiff cannot hold, such as one after the year 9999. It now prints the raw value and unit instead, as the `Display` of `Timestamp` has done since #10953. Signed-off-by: Connor Tsui <[email protected]>
connortsui20
marked this pull request as ready for review
November 3, 2026 22:55
connortsui20
enabled auto-merge (squash)
November 3, 2026 22:57
12 of 49 tasks
robert3005
approved these changes
Nov 4, 2026
connortsui20
added a commit
that referenced
this pull request
Nov 4, 2026
TS (#10953) merged on 2026-11-03, and SN1 (#11183) and V10 (#11187) merged on 2026-11-04. The dependency graph marks the three merged and moves its state date to 2026-11-04. It gives SD, DP, FD and U9 their open PRs (#11184, #11185, #11186 and #11188), and it drops #10408, which closed without a merge. The text of parts 4 and 5 and the Fix lines of EXT-V9, EXT-V10, EXT-N2 and EXT-S3 now record the same state. Also record that AX, DS and SN2 are implemented on branches without a PR, and add the approved one-pass design for the masked nulls of SN2. Part 2 and decision X31 also record the fixes: #10953 made every i64 legal, #11183 made the spatial validators reject nullable nested levels, #11187 gave the Date display its fallback, and #10408 closed. Signed-off-by: Connor Tsui <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dateaccepts everyi32day count and everyi64millisecond count, but jiff only holds the years -9999 to 9999, so formatting a validDateoutside that range panicked.Displaynow prints the raw value and unit instead (e.g.,10000000days), like theTimestampfallback from #10953.Changes
Tests cover the first date after 9999-12-31, day and millisecond counts that a jiff
Spancan't hold, and an ordinary date whose output doesn't change.