Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Chronic.parse('1200') returns 12am, not 12pm #104

Open
PandaWhisperer opened this Issue Jul 11, 2012 · 2 comments

Comments

Projects
None yet
3 participants

Conversely, Chronic.parse('0000') returns 12pm. Should be the other way 'round, 00:00 == 12am

http://en.wikipedia.org/wiki/12-hour_clock

+1 - this is biting us too. I'm going to have to do some pre-parsing.

Collaborator

davispuh commented Aug 22, 2013

Seems to be fixed, atleast works for me

irb> Chronic.parse('0000')
=> 2013-08-23 00:00:00 +0300
irb> Chronic.parse('1200')
=> 2013-08-22 12:00:00 +0300
irb> Chronic.parse('0000', {:context => :past })
=> 2013-08-22 00:00:00 +0300
irb> Chronic.parse('1200', {:context => :past })
=> 2013-08-22 12:00:00 +0300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment