Skip to content

Conversation

@justincy
Copy link
Contributor

This bug was manifest under the following conditions:

  • Calculating duration
  • Duration involved days and months
  • Months of the start and end dates were different lengths (30 vs 31 days)
  • The end day was smaller than the start day

It used the wrong month's days when calculating the overflow for the month. As you can see below I just needed to calculate the days after the overflow of the month was performed instead of before.

@justincy
Copy link
Contributor Author

Just pushed 9ff7605 which adds a broken test for a different (but likely related) bug. Still diagnosing.

@justincy
Copy link
Contributor Author

It was the same bug but in the opposite direction when adding durations.

@justincy
Copy link
Contributor Author

I just realized that only commented about adding broken tests but never stated that I actually fixed the problem. This has been ready to merge for months.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant