Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for British English date expression "in three weeks' time" by extending the date parser to recognize the "time" suffix in relative date phrases. The change addresses issue #393 by adding both the specific test case and the general pattern support.
- Adds test cases for "in three weeks" and "in three weeks time" expressions
- Updates JSON translation data to include the "weeks time" pattern
- Updates Python translation data with regex pattern for "weeks time" suffix
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/test_freshness_date_parser.py | Adds test cases for the new British English date expressions |
| dateparser_data/cldr_language_data/date_translation_data/en.json | Adds "in {0} weeks time" pattern to translation data |
| dateparser/data/date_translation_data/en.py | Adds regex pattern for "in (\d+[.,]?\d*) weeks time" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1283 +/- ##
=======================================
Coverage 97.49% 97.49%
=======================================
Files 234 234
Lines 2793 2793
=======================================
Hits 2723 2723
Misses 70 70 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Gallaecio
approved these changes
Jul 31, 2025
wRAR
approved these changes
Jul 31, 2025
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.
Fix: #393