Period between years incorrect around Feb 28th/29th #224

Closed
GoogleCodeExporter opened this Issue Mar 15, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@GoogleCodeExporter
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

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

Fixed in revision 20a963e2b698 which also deals with IslamicCalendarSystem.

Original comment by jonathan.skeet on 11 Jun 2013 at 8:03

  • Changed state: Fixed
Fixed in revision 20a963e2b698 which also deals with IslamicCalendarSystem.

Original comment by jonathan.skeet on 11 Jun 2013 at 8:03

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

Original comment by malcolm.rowe on 26 Jul 2013 at 10:02

  • Added labels: Milestone-1.2.0

Original comment by malcolm.rowe on 26 Jul 2013 at 10:02

  • Added labels: Milestone-1.2.0

@malcolmr malcolmr added the bug label Mar 15, 2015

@malcolmr malcolmr modified the milestone: 1.2.0 Mar 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment