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
I am running into an issue that just started this month. Here is come sample code:
DateTime now = new DateTime();
now = now.minusMonths(11);
now = now.minusWeeks(3);
now = now.plusMonths(11);
System.out.println(Weeks.weeksBetween(now, new DateTime()).getWeeks());
weeksBetween will return 2 instead of 3. Anyone know why this is occurring? I am using 2.2 version of the API.
Thanks!
The text was updated successfully, but these errors were encountered:
For a little more information on the subject. If I take the testing back one month, everything works correctly:
DateTime now = new DateTime();
now = now.minusMonths(11);
now = now.minusWeeks(3);
now = now.plusMonths(11);
System.out.println(Weeks.weeksBetween(now.minusMonths(1), new DateTime().minusMonths(1)).getWeeks());
This test correctly produces 3 weeks, but something about the month of October yields incorrect results
Just to note for anyone googling this thread that plusMonths(n).minusMonths(n) will not necessarily result in the same date. For example, March 31st plus one month is April 30th, minus one month is March 30th.
Hi!
I am running into an issue that just started this month. Here is come sample code:
DateTime now = new DateTime();
now = now.minusMonths(11);
now = now.minusWeeks(3);
now = now.plusMonths(11);
System.out.println(Weeks.weeksBetween(now, new DateTime()).getWeeks());
weeksBetween will return 2 instead of 3. Anyone know why this is occurring? I am using 2.2 version of the API.
Thanks!
The text was updated successfully, but these errors were encountered: