scrapinghub / scrapinghub/dateparser
Parser confuses sept (7) with sept. (septembre) in French
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
Great package - hugely appreciated.
Noticed this odd one ...
>>> sys.version
'3.11.11 (main, Feb 8 2025, 18:08:18) [Clang 16.0.0 (clang-1600.0.26.6)]'
>>> dateparser.__version__
'1.2.2'
>>> dateparser.parse('1 janv. 2024', locales=['fr'])
datetime.datetime(2024, 1, 1, 0, 0) # Correct
>>> dateparser.parse('1 sept. 2024', locales=['fr'])
datetime.datetime(2024, 7, 1, 0, 0) # Incorrect - sept. should be interpreted as septembre (9) not as 7
>>> dateparser.parse('1 septembre 2024', locales=['fr'])
datetime.datetime(2024, 9, 1, 0, 0) # Correct
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with dateparser.parse('1 sept. 2024', locales=['fr']) and compare it with the full 'septembre' form and the existing 'janv.' example. Trace the French locale's month-abbreviation handling; done means the abbreviated form parses as September while the existing examples remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100