scrapinghub / scrapinghub/dateparser

Formats "<date> <month>" and "<month> <date>" observed to have failed for some languages

Open
#415 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.