Skip to content

Add British English: 'in three weeks' time#1283

Merged
serhii73 merged 2 commits intomasterfrom
fix/393
Jul 31, 2025
Merged

Add British English: 'in three weeks' time#1283
serhii73 merged 2 commits intomasterfrom
fix/393

Conversation

@serhii73
Copy link
Copy Markdown
Collaborator

Fix: #393

@serhii73 serhii73 requested a review from Copilot July 31, 2025 12:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.49%. Comparing base (abf7130) to head (951b8a2).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@serhii73 serhii73 requested a review from wRAR July 31, 2025 12:51
@serhii73 serhii73 merged commit 0667cb3 into master Jul 31, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider parsing "3 weeks time"

4 participants