scrapinghub / scrapinghub/dateparser

Unable to parse: the 1st [day] of last month

Open
#1,265 2 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

>>> print(dateparser.parse("today"))
2025-04-05 19:29:42.111011
>>> print(dateparser.parse("the 1st of last month"))
2025-03-05 19:29:46.118149
>>> 

Inserting the "day" word does not fix it:

>>> print(dateparser.parse("the 1st day of last month"))
2025-03-04 19:31:12.496695
>>> 

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 three dateparser.parse examples from the issue and inspect the parser's handling of relative month expressions and ordinal day wording. Done means both "the 1st of last month" and "the 1st day of last month" resolve to the first day of the previous month rather than March 5 or March 4.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.