You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Period between years incorrect around Feb 28th/29th #224
This test fails:
[Test]
public void BetweenLocalDates_LeapYear()
{
LocalDate d1 = new LocalDate(2012, 2, 29);
LocalDate d2 = new LocalDate(2013, 2, 28);
Assert.AreEqual(Period.FromYears(1), Period.Between(d1, d2));
Assert.AreEqual(Period.FromMonths(-11) + Period.FromDays(-30), Period.Between(d2, d1));
}
for a reason similar to issue 223. It gets frankly confusing to think about.
BasicGJCalendarSystem.GetYearDifference / BasicMonthPeriodField are the
immediate culprits, but I suspect that IslamicCalendarSystem could be
interesting too. More tests required, probably when I'm less sleepy.
Original issue reported on code.google.com by jonathan.skeet on 11 Jun 2013 at 4:25
Activity