scrapinghub / scrapinghub/dateparser
search_dates with fractional seconds
Open
Nobody has claimed this yet.
search_dates
Type: Bug
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
>>> from dateparser.search import search_dates
>>> search_dates("Cloud-init v. 0.7.6 running 'init-local' at Thu, 05 Jul 2018 15:13:48 +0000. Up 27.78 seconds.")
[(u'at Thu, 05 Jul 2018 15:13:48 +0000', datetime.datetime(2018, 7, 5, 15, 13, 48, tzinfo=<StaticTzInfo 'UTC\+00:00'>)), (u'78 seconds', datetime.datetime(2018, 7, 5, 15, 12, 30))]
The fractional 27.78 seconds is detected as 78 seconds
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
Reproduce the reported example by calling dateparser.search.search_dates with the Cloud-init string and inspect how the fractional seconds are parsed. Done means the "27.78 seconds" fragment is no longer incorrectly returned as "78 seconds", while the valid timestamp remains detected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100