-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
difference()
to fully support rounding
Adds full rounding support to difference(). Fixes #1023. Notes: * See #1023 for details on the algorithm. * I added a bunch of new test cases for various DST-related edge cases. * I suspect this algorothm can be simplified; it's not particularly DRY. * This commit does *not* enable DST awareness in the `round` method. `round` currently works, but without any DST support which is OK for the time being. We can PR a DST-aware `round` in the next few weeks. * The algorithm and/or implementation can probably be adapted for later use in `round`, as well as Duration's `add`, `subtract`, and `round` when `relativeTo` is a ZDT instance. I can help with this next week. * Docs updates for ZDT are not included in this commit. I'll file a new PR for docs changes next week.
- Loading branch information
1 parent
a0004f5
commit 5b0947c
Showing
5 changed files
with
547 additions
and
302 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
Oops, something went wrong.