scrapinghub / scrapinghub/dateparser

dateorder of specific language ignored

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

Nobody has claimed this yet.

search_dates
Dominant language
Python
Stars
2.9k
Forks
520
Avg merge
22h 56m
Merged PRs (30d)
6

Description

possibly related with #804

version of lib: 1.0.0
OS: win10 - 20H2
Py: 3.9.1

from dateparser.search import search_dates
search_dates("01.11.2019", languages=["de"], add_detected_language=True)

returns [('01.11.2019', datetime.datetime(2019, 1, 11, 0, 0), 'de')]

cleary the wrong order, since dateparser_data/cldr_language_data/date_translation_data/de.json contains

"date_order": "DMY",

the reversed order is fine though!
search_dates("2019.11.01", languages=["de"], add_detected_language=True)
returns [('2019.11.01', datetime.datetime(2019, 11, 1, 0, 0), 'de')]

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

Start at the search_dates call shown in the report and inspect how the German data in dateparser_data/cldr_language_data/date_translation_data/de.json is used. Reproduce both examples with Python 3.9.1, then verify that the first input returns 1 November 2019 while the reversed-order example remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
localization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.