scrapinghub / scrapinghub/dateparser
Formats "<date> <month>" and "<month> <date>" observed to have failed for some languages
Open
Nobody has claimed this yet.
Type: Bug
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
Version: 0.7.0
Examples:
>>> datetime.datetime.utcnow()
datetime.datetime(2018, 5, 25, 13, 43, 18, 211100)
>>>
>>> dateparser.parse('18 1月', languages=['ja']) # bad
datetime.datetime(2018, 1, 25, 0, 0)
>>> dateparser.parse('1月 18', languages=['ja']) # bad
datetime.datetime(2018, 1, 25, 0, 0)
>>> dateparser.parse('1月 18, 2018', languages=['ja']) # good
datetime.datetime(2018, 1, 18, 0, 0)
>>>
>>> dateparser.parse('18 sausis', languages=['lt']) # bad
datetime.datetime(2018, 1, 25, 0, 0)
>>> dateparser.parse('sausis 18', languages=['lt']) # bad
datetime.datetime(2018, 1, 25, 0, 0)
>>> dateparser.parse('sausis 18, 2018', languages=['lt']) # good
datetime.datetime(2018, 1, 18, 0, 0)
>>>
>>> dateparser.parse('18 gennaio', languages=['it']) # good
datetime.datetime(2018, 1, 18, 0, 0)
>>> dateparser.parse('gennaio 18', languages=['it']) # good
datetime.datetime(2018, 1, 18, 0, 0)
>>> dateparser.parse('gennaio 18, 2018', languages=['it']) # good
datetime.datetime(2018, 1, 18, 0, 0)
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
Reproduce the Japanese and Lithuanian examples from the issue with dateparser.parse, and compare them with the working Italian cases. Trace how these language-specific date and month formats are handled; done means the failing inputs return the day and month shown in the input, with the existing successful cases still working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100