scrapinghub / scrapinghub/dateparser

Issue parsing shortened date string

Open
#1,232 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

With dateparser v 1.2.0 there is an issue with parsing shortened string.
Please see example below (screenshot attached):

$ dateparser.parse('Tue').strftime("%A")
$ Friday

Expectation: Tuesday

Screenshot 2024-08-02 at 5 26 13 PM

However, with 1.1.8, this issue is not happening, kindly fix the latest version. Thanks

Tip: May be today is Friday, so it is picking Friday? (not sure just wanted to share here, just in case)

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 dateparser.parse('Tue') entry point and reproduce the result on version 1.2.0, then compare it with version 1.1.8. Investigate why the shortened weekday resolves to Friday instead of Tuesday; done means the example returns Tuesday without regressing the older behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
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.