scrapinghub / scrapinghub/dateparser
Time part should not be there if time in search_dates output if time information is not present in text.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
I have used search_dates in dateparser.search. The output of search_dates is 00:00:00 when time information is not present.
For example in I will connect with you on Monday, the output is [('on monday', datetime.datetime(2023, 4, 10, 0, 0))].
Is it possible for these cases where time is not present, we return only the date part of the datetime and not return time as 0,0? In postprocessing to remove time when it is 0,0. But, it will create problems when the time is indeed 0,0.
How to solve this?
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 search_dates entry point in dateparser.search and reproduce the Monday example from the issue. Trace how absent time is represented and how explicit midnight is distinguished before deciding on the return contract. Done means the example omits time without changing cases where midnight was explicitly present, with regression coverage for both.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100