calendar.js
Wrapper around momentjs for operations around days with configuration of weekends and holidays.
Usage
Install from npm
npm install calendar-ops --save
Import and create a new Calendar object
; let calendar = ;
Configure weekends / weekly holidays.
Defaults to Saturday and Sunday.
calendar;
This code sets weekly holidays to Fridays. Use array of numbers between 0 to 6 corresponding to Sunday thorugh Saturday.
Configure holidays
//Array of date objects / date stringscalendar; //Date object / stringcalendar; //Date range - array of two date objects / strings corresponding to start date and end datecalendar;
Start adding days
//Pass a date object / string and number of days to addcalendar;