Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Open
PandaWhisperer opened this Issue · 2 comments

3 participants

@PandaWhisperer

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

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

@muflax muflax referenced this issue in muflax/fume
Closed

Time parsing incorrect #5

@DaveSanders

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

@davispuh
Collaborator

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
Something went wrong with that request. Please try again.