scrapinghub / scrapinghub/dateparser
Support intervals/durations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
Hi!
Good work guys, your lib is amazing!
I'm interested in parsing intervals/durations as a duration, not a date.
What do you think about creating separate function with this?
There's lack of parsers like this as far as I see.
I'd like to be able to parse "1d2h3m" like dates but also in another format, which seems to work at least good with this lib, but doing (datetime.datetime.now() - dateparser.parse("30min")) doesn't seem right and also allows doing very weird and confusing things with input.
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
The issue names no files or tests. Start by reviewing the existing dateparser.parse() entry point and how inputs such as "30min" are currently interpreted. Done should include a separate way to parse interval or duration expressions such as "1d2h3m" without treating them as dates, with behavior covered by tests.
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
- Mostly clear
- Newbie friendliness
- 30/100