chronic icon indicating copy to clipboard operation
chronic copied to clipboard

Unexpected result when adding a `.`

Open besi opened this issue 10 years ago • 1 comments

The German format may look like this:

11. Juli 2015

So to parse I replaced the month names and as I now tried to parse as follows I got an unexpected result:

irb(main):009:0> Chronic.parse('11. july 2014')
=> 2014-07-16    NOT OK

irb(main):008:0> Chronic.parse('11 july 2014')
=> 2014-07-11    OK

So as soon as there is a . after the day, the parsing gets mixed up. Even though this might not be an official format I still would not expect the . to interfere with the parsing.

besi avatar Feb 02 '15 10:02 besi

yeah, it's a bug, will probably be fixed in some next version

davispuh avatar Feb 02 '15 13:02 davispuh