kkaefer/chrono.js — Issue #3: Leap year intervals
Author: lxbarth
Created: 2012-01-28 16:43:56+00:00
State: open

The second assertion here fails:

assert.eql(new Date('Feb 28 2004').interval(new Date('Feb 28 2005')), ['1 year']);
assert.eql(new Date('Feb 28 2004').interval(new Date('Mar 1 2005')), ['1 year', '1 day']);

Not sure how you'd like to go about this:

- The first result of interval() is actually not correct if you take a year to be 365 days. There are 366 days between Feb 28 04 and Feb 28 05.
- The second result of interval() is actually correct (it yields 1 year, 2 days) which is what I'd expect but the test looks for one day less.