Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix DST issue in getOverlappingDaysInIntervals
Fixed DST issue in `getOverlappingDaysInIntervals`, resulting in an inconsistent number of days returned for intervals starting and ending in different DST periods.
- Loading branch information
1 parent
a960fc2
commit aa264e3
Showing
5 changed files
with
93 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import assert from "assert"; | ||
import { getOverlappingDaysInIntervals } from "../../../src/getOverlappingDaysInIntervals/index.js"; | ||
|
||
assert.strictEqual( | ||
getOverlappingDaysInIntervals( | ||
{ | ||
start: new Date(2001, 8 /* Sep */, 1, 16), | ||
end: new Date(2023, 11 /* Dec */, 20, 16), | ||
}, | ||
{ | ||
start: new Date(2023, 11 /* Dec */, 21, 16), | ||
end: new Date(2001, 8 /* Sep */, 9, 16), | ||
}, | ||
), | ||
8137, | ||
); |