hourly-work

1.0.0 • Public • Published

Hourly Work!

A work schedule management package.

How it works ?

All you need to do is import the necessary

const {hourlyWork, Hour, Hourly} = require("hourly-work")

Then create your schedule with start and end times.

let beginMorning = new Hour(8, 0)
let endMorning = new Hour(12, 0)
let beginEvening = new Hour(13, 0)
let endEvening = new Hour(19, 0)
let morning = new Hourly(beginMorning, endMorning)
let evening = new Hourly(beginEvening, endEvening)

Finally, add a start date and an end date to call hourlyWork.

let begin = new Date(2023, 9, 7, 11, 52)
let end = new Date(2023, 9, 10, 22 , 53)
let workTime = hourlyWork(begin, end, morning, evening, "USA")

The first two parameters represent the timetable search limits, the next two the timetables and the last, the country chosen to take holidays into account.

Package Sidebar

Install

npm i hourly-work

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

12.9 kB

Total Files

7

Last publish

Collaborators

  • aucuno024