Open kmccarp opened 9 years ago
these work on 0.10.2 and on master
Chronic.parse('1000-01-01')
=> 1000-01-01 12:00:00 +0200
Chronic.parse('0999-01-01')
=> 0999-01-01 12:00:00 +0200
Chronic.parse('0000-01-01')
is expected to be nil, I don't think anyone would encounter such valid date.
Chronic.parse('999-01-01')
Chronic.parse('100-01-01')
these probably won't work in future versions unless there's a good reason to implement them, because typically year is always 4 digits and it doesn't really make sense with 3 digits and what about Chronic.parse('10-01-01')
? that might be short year notation so it wouldn't be possible to specify 10year anyway.
Chronic.parse('1000-01-01') returns the correct date. => 1000-01-01 12:00:00 -0752
However,
Chronic.parse('0999-01-01') => nil and Chronic.parse('0000-01-01') => nil
both return nil.
Chronic.parse('999-01-01') => 0999-01-01 12:00:00 -0752 and Chronic.parse('100-01-01') => 0100-01-01 12:00:00 -0752
both work, though.