New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

GoogleCodeExporter commented Mar 15, 2015

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.

GoogleCodeExporter commented 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
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

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