mojombo/chronic — Issue #73: Parsing error
Author: sidvorak
Created: 2011-10-19 22:08:44+00:00
State: open

I've found a parsing bug. See below. If anyone has any ideas please let me know...

>> now=Time.now
=> 2011-10-19 15:00:12 -0700
>> Chronic.parse("5th Tuesday this October")
=> 2011-11-01 12:00:00 -0700
>> Chronic.parse("5th Tuesday this October",:now=>d)
=> 2011-11-01 12:00:00 -0700
>> Chronic.parse("5th Tuesday next October",:now=>d)
=> 2011-11-01 12:00:00 -0700
>> now=Date.parse("2011-1-1")
=> Sat, 01 Jan 2011
>> Chronic.parse("5th Tuesday next October",:now=>d)
=> 2011-11-01 12:00:00 -0700
>> Chronic.parse("5th Tuesday this October",:now=>d)
=> 2011-11-01 12:00:00 -0700
>> Chronic.parse("5th Tuesday in October",:now=>d)
=> 2011-11-01 12:00:00 -0700