eduolalo / moment-business-days

This is a momentJS plugin that allows you to use only business days (Monday to Friday)
MIT License
240 stars 67 forks source link

Wrong businessDiff result on a specific case #93

Closed bdinos closed 3 years ago

bdinos commented 3 years ago
const moment = require('moment-business-days')
const days = moment('2021-02-03T01:59:00-05:00').businessDiff(moment('2021-02-02T00:00:00-05:00'))
console.log(days)

Result is 2 instead of 1.

Is this a bug or have I misunderstood how businessDiff() works?

mcdado commented 3 years ago

It was fixed in 052a4a7c1413e7418e42b4d931857abc3903c2b1 but it hasn't been released yet. I'll ping @kalmecak

bdinos commented 3 years ago

Confirmed. It works on latest code.