Closed laxu closed 5 years ago
Hmm, can you provide more specifically what date
is? If it has also time information or just date. That would be useful to setup a test case.
I used the value mentioned, so date
in this case is string 2019-01-03T12:00:00.000Z
.
So, as it happens it was fixed in 6d2f1f502f4528912fd09caf895dc5f2a22588af which is the commit right after 1.1.3
release. The problem is that 1.1.4 hasn't been released yet. I'll bump it with @kalmecak
I think until @kalmecak publishes a new version you can put kalmecak/moment-business-days in your package.json file: https://docs.npmjs.com/files/package.json#github-urls
This should pull in the latest version, but i don't know for sure.
With moment-business-days 1.1.2 the following works as expected:
moment(date).businessAdd(1, 'days').toISOString();
The result is date + 1 day, e.g.
2019-01-03T12:00:00.000Z
to2019-01-04T12:00:00.000Z
.But with moment-business-days 1.1.3 I instead get
2019-01-03T22:00:00.000Z
with the same date. So the time advances by +10 hours instead of the day.