-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Limit year, month, and week length calculations to nonzero
In order to calculate the rounded value and totals in RoundDuration, when rounding to years, months, or weeks, we need to divide by the length of the year, month, or week in days. Throw an exception if this would otherwise result in division by zero. This is marked 'editorial' because division by zero with mathematical values is an editorial error in the spec. However, the month/week divisions didn't exist before the normative change in the previous commit, so this would previously only have applied to years. Closes: #2335
- Loading branch information
Showing
2 changed files
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters