Chronic and Time Spans

Chronic.parse ‘past 2 months’, :guess => false
=> Sun Aug 16 18:01:15 -0700 2009…Sun Aug 16 18:01:16 -0700 2009

past 2 months represent time spans not a single day.

Chronic.parse ‘this past week’, :guess => false
=> Sun Oct 04 00:00:00 -0700 2009…Sun Oct 11 00:00:00 -0700 2009

that works, but these don’t:

Chronic.parse ‘past 2 weeks’, :guess => false
=> Sun Oct 02 14:00:00 -0700 2009…Sun Oct 02 14:00:01 -0700 2009

Chronic.parse ‘this past 2 months’, :guess => false
=> Tue Sep 01 14:00:00 -0700 2009…Tue Sep 01 14:00:01 -0700 2009

These are inconsistent. Please tell me I’m missing something.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs