scrapinghub / scrapinghub/dateparser
Enhancement: Let dateparser.parse take multiple strings to narrow down guesses
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
Let's say we have 3 date strings, 2 of them with ambiguous format and the last with unambiguous format:
2015/1/1
2015/2/3
2015/31/12
If we can pass these 3 date strings into dateparser.parse altogether at once, then the first 2 date strings can be parsed confidently because of the strong hint from the 3rd date string. This will be very useful for guessing the format of date-like fields from csv files. Something like https://github.com/hi-primus/hi-dateinfer
Is this actually already achievable with the current dateparser?
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 with the dateparser.parse entry point and compare its current behavior on the three example strings. Review the linked hi-dateinfer project for the proposed multi-string inference approach. Done means determining whether the existing API already supports this and, if not, defining support for parsing multiple strings together so unambiguous values can guide ambiguous ones.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100