build(deps): replace htp with chrono-english#1256
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1256 +/- ##
==========================================
+ Coverage 87.11% 87.19% +0.08%
==========================================
Files 66 66
Lines 10805 10873 +68
==========================================
+ Hits 9413 9481 +68
Misses 1392 1392 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b782cee to
8017705
Compare
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.
Replace
htpwithchrono-englishfor human-readable time parsingSummary
This PR replaces the
htptime parsing library withchrono-englishfor parsing human-readable time expressions in filter options like--sinceand--until.Motivation
The
htplibrary is unmaintained, whilechrono-englishis an actively maintained library with broader community support and similar functionality for parsing English date/time expressions.What Changed
❌ No Longer Supported
"friday at 19:00""last friday 19:00""last friday at 19:00""last friday 19:00""monday at 6 am""last monday 6:00"✨ Newly Supported
"last friday 19:00""last April""april""dec""1 April 2025""2025-12-15""2025""2026"✅ Works the Same in Both
"1 hour ago""2 days ago""1 week ago""now""last friday""last monday""7am""19:00"-1h,-2d,-1wMigration Guide
Must Update
If you're using weekday with "at" + time:
No Changes Needed
These continue to work identically:
New Capabilities
Month-based filtering
Weekday with time (no "at" needed)
Common Patterns
--since -1hor--since "1 hour ago"--since -1dor--since yesterday--since -1wor--since "1 week ago"--since "last friday"or--since friday--since "last friday 19:00"✨--since "last April"or--since april✨✨ = New capability
Technical Details
htp(git fork) →chrono-english 0.1(crates.io)Dialect::Usfor consistent date interpretation"friday") are automatically prefixed with"last "to maintain htp behavior"april","dec") are automatically prefixed with"last "for consistent behavior"today"and"yesterday"are adjusted to start-of-day (00:00) instead of current time1h,2dare rejected to prevent confusion--time-zoneand--localoptions as before