work-time-diff
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i work-time-diff

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

12.6 kB

Total Files

24

Last publish

Collaborators

  • itwillwork