Skip to content

extraction: add Russian month names (#156) - #210

Open
hasandenizuk wants to merge 1 commit into
adbar:masterfrom
hasandenizuk:fix/156-russian-month-names
Open

hasandenizuk wants to merge 1 commit into
adbar:masterfrom
hasandenizuk:fix/156-russian-month-names

Conversation

@hasandenizuk

Copy link
Copy Markdown

Adds the Russian month names (nominative and genitive, e.g. "июль" and "июля") to MONTHS, as suggested in #156.

Before, a page with only a Russian text date such as 30 Июля 2015 gave None in fast mode. In extensive mode, 12 марта 2021 came back as 2021-01-01. Both now give the right date.

Changes:

  • htmldate/extractors.py: Russian names added to each month tuple (the tuples are now multi-line after ruff format).
  • tests/unit_tests.py: every Russian name in test_regex_parse (lower and upper case), ru added to the dateparser consistency check, and a find_date test for both modes.
  • docs/index.rst and CHANGELOG.md: Russian added to the supported languages.

Tested: pytest, ruff check ., ruff format --check htmldate tests, mypy -p htmldate and eval_gate.py (TZ=Europe/Berlin). Fast F1 goes from 0.9265 to 0.9270, extensive stays at 0.9490. The only test failures are the four that need network access, and they fail the same way on master.

This touches the same tuples as #207 (Polish), so whichever goes second needs a small rebase. I can do that.

Fixes #156

@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3299d21) to head (d6a5bbe).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #210   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          886       886           
=========================================
  Hits           886       886           

☔ 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.

@adbar

adbar commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Could you rebase it on master now that #207 is merged?

Text-based extraction now knows the nominative and genitive Russian month names, so dates such as "30 июля 2015" are found in fast mode and no longer fall back to a wrong day in extensive mode.
@hasandenizuk
hasandenizuk force-pushed the fix/156-russian-month-names branch from d6a5bbe to 3110aa4 Compare November 6, 2026 17:39
@hasandenizuk

Copy link
Copy Markdown
Author

Rebased on master. The conflict was in the month tuples, the docs line and the dateparser language list; both the Polish and the Russian names are kept. Tests, ruff, mypy and eval_gate pass locally (fast F1 0.9270, extensive 0.9490).

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.

The script does not find the date (Russian)

2 participants