Add extended runtime + ParsedDateTime API for large years#263
Add extended runtime + ParsedDateTime API for large years#263abhishekpradhan wants to merge 12 commits intouutils:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #263 +/- ##
==========================================
+ Coverage 98.92% 99.29% +0.37%
==========================================
Files 18 20 +2
Lines 2605 3846 +1241
Branches 69 121 +52
==========================================
+ Hits 2577 3819 +1242
+ Misses 27 26 -1
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Status update: I closed the two superseded fork-only stacked PRs to reduce review noise.
This PR is now the active runtime/API review path. The tests/docs follow-up (clean PR3 branch) is prepared and will be opened upstream immediately after this merges. |
| @@ -109,7 +164,7 @@ pub fn parse_datetime<S: AsRef<str> + Clone>(input: S) -> Result<Zoned, ParseDat | |||
| pub fn parse_datetime_at_date<S: AsRef<str> + Clone>( | |||
There was a problem hiding this comment.
This is a semver-breaking change.
you are changing the public profile of crate
are you sure it is necessary?
There was a problem hiding this comment.
How does this work for semver? I've changed it so the existing parse_datetime and parse_datetime_at_date APIs keep returning Zoned, and the ParsedDateTime behavior is exposed through separate extended-aware entrypoints instead.
Summary
ExtendedDateTimeruntime support for years beyond Jiff's in-range civil datetime supportParsedDateTime(InRange|Extended) and return it from parser entry pointsContext
Reviewer Guide
src/lib.rssrc/items/mod.rstests/common/mod.rssrc/items/builder.rssrc/extended.rssrc/items/epoch.rssrc/items/offset.rssrc/items/weekday.rstests/large_year.rstests/time.rssrc/items/mod.rs,src/items/builder.rs,src/extended.rsValidation
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test -q