Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed Aug 3, 2021
2 parents fc29038 + ab19fc8 commit 25e6456
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/methods/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const dstAwareUnits = {
season: true,
month: true,
week: true,
day: true
date: true
}

const keepDate = {
Expand Down
4 changes: 4 additions & 0 deletions test/add.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ test('day-tricky', (t) => {
d = d.add(7, 'days')
t.equal(d.format('nice-day'), 'Mon Nov 11th', 'add days over dst-change')

d = spacetime('2021-10-31T00:00:00.000', 'Europe/London')
d = d.add(1, 'day')
t.equal(d.format('iso-utc'), '2021-11-01T00:00:00.000Z', 'add 1 day over dst-change')

// add day over month-change
let s = spacetime('Oct 31 2020', 'Canada/Eastern')
s = s.add(2, 'day')
Expand Down

0 comments on commit 25e6456

Please sign in to comment.