-
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.
Normative: Balance durations after rounding in until()/since()/toStri…
…ng() In cases where a number rounded up to the next unit, we would previously return a result that didn't respect the `largestUnit` option in the same way that Duration.prototype.round() would. To fix this, we need to call BalanceDateDurationRelative after RoundDuration in the until()/since() methods that deal with date units (time units already behaved correctly). In Duration.prototype.toString() where time units did not already behave correctly, we need to call BalanceTimeDuration. I was not sure whether it was intentional that we didn't call this, but as far as I can determine from the previous discussions, `toString()` was "controls rounding, works same as `round()`", but the status quo was that it worked differently from `round()`.) Closes: #2563
- Loading branch information
Showing
7 changed files
with
138 additions
and
40 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
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
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
Oops, something went wrong.