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

Can't parse 2nd sunday in march 2014 #283

Closed
dankohn opened this issue Nov 4, 2014 · 2 comments
Closed

Can't parse 2nd sunday in march 2014 #283

dankohn opened this issue Nov 4, 2014 · 2 comments
Labels

Comments

@dankohn
Copy link

dankohn commented Nov 4, 2014

Loading development environment (Rails 4.1.7)
[1] pry(main)> Chronic.parse('2nd sunday in march')
2015-03-08 12:30:00 -0400
[2] pry(main)> Chronic.parse('2nd sunday in march 2014')
nil

It seems Chronic should be able to combine 2nd sunday with a specific month and year, but I couldn't figure out the syntax to have it do so.

Thanks.

@davispuh
Copy link
Collaborator

davispuh commented Nov 4, 2014

I don't think Chronic have ever supported this format (with year). But it will work when #278 will be done.
With that PR

Chronic.parse('2nd sunday march 2014', :guess => false) # it doesn't work with "in", but that will be fixed
=> 2014-03-09 00:00:00 +0200...2014-03-10 00:00:00 +0200

@dankohn
Copy link
Author

dankohn commented Nov 4, 2014

OK, thanks.

@dankohn dankohn closed this as completed Nov 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants