Skip to content
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

Future time of day does not work #320

Open
andrewhavens opened this issue Jan 8, 2016 · 2 comments
Open

Future time of day does not work #320

andrewhavens opened this issue Jan 8, 2016 · 2 comments

Comments

@andrewhavens
Copy link

I expect the returned date to be tomorrow, not today.

> Time.now
=> 2016-01-08 12:35:06 -0800
> Chronic.parse "8am", context: :future
=> 2016-01-08 08:00:00 -0800

I could use "next"...

> Time.now
=> 2016-01-08 12:35:06 -0800
> Chronic.parse "Next 8am", context: :future
=> 2016-01-09 08:00:00 -0800

However, that does not work when you expect to return the current day:

> Time.now
=> 2016-01-08 12:35:06 -0800
> Chronic.parse "Next 2pm", context: :future
=> 2016-01-09 14:00:00 -0800
@nikkypx
Copy link

nikkypx commented Jul 6, 2016

Does "today at 8:00" or "tomorrow at 8:00" solve your problem?

@andrewhavens
Copy link
Author

@nikkypx No, the problem is that I'm asking Chronic to determine this by using the context: :future option. Chronic does not seem to be respecting this option. I just tried this again today using Chronic 0.10.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants