forked from date-fns/date-fns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
intervalToDuration
fix for end of month calculations (date-fns#2616)
Fixed `intervalToDuration` being off by 1 day sometimes. Changed: introduced `RangeError` exception to `intervalToDuration` in case the start of the interval is after its end. This change makes `intervalToDuration`'s API consistent with other interval functions.
- Loading branch information
Showing
2 changed files
with
205 additions
and
52 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