scrapinghub / scrapinghub/dateparser
How to know when a date is incomplete and the missing parts
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
Is there a way to know when a date is incomplete. e.g "December 2015"
from dateparser import parse
parse(u'December 2015') # default behavior
datetime.datetime(2015, 12, 16, 0, 0)
#is a way to do something like this
parse(u'December 2015', settings={'PREFER_DAY_OF_MONTH': 'incomplete'})
datetime.datetime(2015, 12, incomplete, 0, 0)
#the same with year or month
I need to parse data wich contains incomplete dates, in a nutshell i need the following to be done
from dateparser import parse
parse(u'December 2015', settings={'PREFER_DAY_OF_MONTH': 'incomplete'}) #it could be a string or other type
datetime.datetime(2015, 12, incomplete, 0, 0)
i´m sorry about my english, im self taught in it...
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 the existing settings behavior for inputs such as "December 2015". Clarify how incomplete year, month, or day values should be represented, then define acceptance cases for detecting missing parts without relying on the default filled date. Done means the behavior and return type are specified and covered for the incomplete-date examples.
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