Add extended runtime + ParsedDateTime API for large years#263
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 3847 +1242
Branches 69 121 +52
==========================================
+ Hits 2577 3820 +1243
+ 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. |
|
Quick status update: this PR is now back on the direct The only follow-up I still have staged separately is some additional parity coverage in |
|
Heads up: the repo About text still says this crate returns a |
|
thanks! |
Cover the extended year functionality introduced in uutils#263: - Basic extended year parsing (year 10000) - Rollover from in-range to extended (9999-12-31 +1 day) - Relative parsing with extended year base date - Large year parsing (year 999999)
Cover the extended year functionality introduced in #263: - Basic extended year parsing (year 10000) - Rollover from in-range to extended (9999-12-31 +1 day) - Relative parsing with extended year base date - Large year parsing (year 999999)
Summary
ExtendedDateTimeruntime support for years beyond Jiff's in-range civil datetime supportParsedDateTime(InRange|Extended) as the direct return type from parser entry pointsBreaking Change
This PR intentionally changes the public API of
parse_datetime:parse_datetime(...)now returnsResult<ParsedDateTime, ParseDateTimeError>parse_datetime_at_date(...)now returnsResult<ParsedDateTime, ParseDateTimeError>To reflect that, the crate version is bumped from
0.14.0to0.15.0.Context
Reviewer Guide
src/lib.rsREADME.mdsrc/items/builder.rssrc/extended.rssrc/items/mod.rssrc/items/epoch.rssrc/items/offset.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 -qcd fuzz && cargo generate-lockfile