scrapinghub / scrapinghub/dateparser
Single letters parse to...?
Open
Nobody has claimed this yet.
Type: Enhancement
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
Hi, I found several FPs when parsing strings. It appears single letters parse somehow?
In [2]: from dateparser import parse
In [3]: parse("A")
Out[3]: datetime.datetime(2020, 1, 26, 0, 0)
In [4]: parse("B")
Out[4]: datetime.datetime(2020, 8, 23, 0, 0)
In [5]: parse("A").isoformat()
Out[5]: '2020-01-26T00:00:00'
In [6]: parse("B").isoformat()
Out[6]: '2020-08-23T00:00:00'
In [7]: parse("C").isoformat()
Out[7]: '2020-08-21T00:00:00'
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
Start by reproducing the reported parse("A"), parse("B"), and parse("C") results in the dateparser test environment, then trace the parser path handling single-letter input. Confirm the intended behavior for such inputs with the maintainers; done should include regression coverage showing that arbitrary single letters are not falsely parsed as dates.
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
- Needs clarification
- Newbie friendliness
- 28/100