Repository navigation
Document region usage and stabilize current-month parsing - #1332
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1332 +/- ##
==========================================
- Coverage 97.10% 97.10% -0.01%
==========================================
Files 235 235
Lines 2904 2902 -2
==========================================
- Hits 2820 2818 -2
Misses 84 84 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a short explanatory note to the supported locales documentation page clarifying how the region argument relates to the locale codes listed in the table, addressing user confusion from issue #465.
Changes:
- Documents that
regionaccepts the region subtag from a listed locale code, withen-INandfr-CAas examples. - Notes that callers who already know the full locale code can use
locales=[...]directly.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I looked into the failed Build run. The docs job had passed; the failure was limited to the Python 3.13 jobs running under Pacific/Auckland and Pacific/Fiji. Those jobs crossed a month boundary relative to UTC, so incomplete dates such as I pushed a small follow-up commit to keep the current month and day on the same parser-relative base and added a regression test for that case. The new Actions runs are currently in |
|
Thank you! |
Summary
regionargument maps to locale subtags listed on the supported locales page, withen-INandfr-CAexamples.PREFER_MONTH_OF_YEAR="current"to incomplete dates, so current month and current day come from the same relative base.Fixes #465.
Test
python -m sphinx -b html docs docs\_build\html -qpython -m pytest tests/test_search.py -qpython -m pytest tests/test_date_parser.py -k "dates_with_no_day_or_month" -qpython -m ruff check dateparser/parser.py tests/test_date_parser.pypython -m ruff format --check dateparser/parser.py tests/test_date_parser.py