work-time-diff
v1.0.4
Published
#### Installation
Downloads
6
Maintainers
Readme
work-time-diff
Installation
npm i work-time-diff
Usage
const { getWorkTimeDiff } = require('work-time-diff');
const workingTime = {
workingHours: {
from: 10,
to: 20,
},
workingDays: ['1', '2', '3', '4', '5'], // mon, tue, wed, thu, fri
daysOff: ['2023-05-29'],
};
const diff = getWorkTimeDiff(workingTime, '2023-05-26T14:00:00+03:00', '2023-05-30T14:00:00+03:00', 'hours');
console.log(diff); // 10