We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 969aced commit 6fca6d5Copy full SHA for 6fca6d5
test/manipulate.test.js
@@ -52,3 +52,13 @@ it('Add Time days', () => {
52
it('Subtract Time days', () => {
53
expect(dayjs().subtract(1, 'days').valueOf()).toBe(moment().subtract(1, 'days').valueOf())
54
})
55
+
56
+it('Add Time days (DST)', () => {
57
+ // change timezone before running test
58
+ // New Zealand (-720)
59
+ expect(dayjs('2018-04-01').add(1, 'd').format()).toBe(moment('2018-04-01').add(1, 'd').format())
60
+ expect(dayjs('2018-03-28').add(1, 'w').format()).toBe(moment('2018-03-28').add(1, 'w').format())
61
+ // London (-60)
62
+ expect(dayjs('2018-10-28').add(1, 'd').format()).toBe(moment('2018-10-28').add(1, 'd').format())
63
+ expect(dayjs('2018-10-26').add(1, 'w').format()).toBe(moment('2018-10-26').add(1, 'w').format())
64
+})
0 commit comments