Skip to content

Apply PREFER_DAY_OF_MONTH and PREFER_MONTH_OF_YEAR to relative dates - #1413

Merged
AdrianAtZyte merged 2 commits into
scrapinghub:masterfrom
AdrianAtZyte:relative-prefer-day-of-month
Sep 30, 2026
Merged

AdrianAtZyte merged 2 commits into
scrapinghub:masterfrom
AdrianAtZyte:relative-prefer-day-of-month

Conversation

@AdrianAtZyte

Copy link
Copy Markdown
Member

Fixes #979

@codspeed

codspeed Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 7 untouched benchmarks


Comparing AdrianAtZyte:relative-prefer-day-of-month (8db1909) with master (0961388)

Open in CodSpeed

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.82%. Comparing base (a3fafe5) to head (8db1909).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1413   +/-   ##
=======================================
  Coverage   98.81%   98.82%           
=======================================
  Files         237      237           
  Lines        3218     3222    +4     
=======================================
+ Hits         3180     3184    +4     
  Misses         38       38           

☔ View full report in Codecov by Harness.
📢 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.

@AdrianAtZyte
AdrianAtZyte marked this pull request as ready for review September 23, 2026 09:50

@serhii73 serhii73 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@AdrianAtZyte AdrianAtZyte reopened this Sep 30, 2026
@AdrianAtZyte
AdrianAtZyte merged commit 36d0af5 into scrapinghub:master Sep 30, 2026
32 of 34 checks passed
dmarcelino added a commit to dmarcelino/lollo-rozzo that referenced this pull request Nov 15, 2026
dateparser 1.5.0 applies PREFER_DAY_OF_MONTH to relative month and year
periods (scrapinghub/dateparser#1413), so with our "first" (there for a month
without a day) "4 months ago" became the 1st of that month. A date parse_date
has found to be relative is read again with "current"; a month without a day
still gives the 1st, and 1.4.3 gives the same results as before.
lollo-rozzo-renovate Bot added a commit to dmarcelino/lollo-rozzo that referenced this pull request Nov 15, 2026
* Update dependency dateparser to v1.5.0

* News Radar: relative dates keep their day under dateparser 1.5

dateparser 1.5.0 applies PREFER_DAY_OF_MONTH to relative month and year
periods (scrapinghub/dateparser#1413), so with our "first" (there for a month
without a day) "4 months ago" became the 1st of that month. A date parse_date
has found to be relative is read again with "current"; a month without a day
still gives the 1st, and 1.4.3 gives the same results as before.

---------

Co-authored-by: lollo-rozzo-renovate[bot] <356912970+lollo-rozzo-renovate[bot]@users.noreply.github.com>
Co-authored-by: Dario Marcelino <[email protected]>
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.

support for start of the month or week

2 participants