-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: add PREFER_TIME_OF_DAY in settings #802
Comments
Hi @monatis ! Thank you for your comment. I'm going to think about it and return to you. For then meanwhile, you can use something like: import dateparser
>>> dateparser.parse('tomorrow').replace(hour=9, minute=0, second=0, microsecond=0)
datetime.datetime(2020, 9, 30, 9, 0) |
Hi @noviluni, thank you for the tip! I'll think through it --it might be the solution when applied with some extra conditionals to detect if a time expression is missing. |
I'm looking for a similar thing. I just wanted to add that currently specifying a day of the week gives a time of 0:00. It would be nice to have this apply to that as well. |
Hi,
Thank you for this great project --we find it quite useful for our conversational AI projects.
Let me explain the feature I'm suggesting: In current / default behavior, when time is missing it is interpreted as the current time of day. A flag in
settings
calledPREFER_TIME_OF_DAY
might be useful just likePREFER_DAY_OF_MONTH
. For example, a date stringtomorrow
is parsed as 24 hours from now. WithPREFER_TIME_OF_DAY
introduced, it can be parsed as a preferred time of day (e.g., 9:00 a.m.).Thanks.
The text was updated successfully, but these errors were encountered: