Temporal frequency library
npm install --save date-frequency
If ES3 support is necessary, also install
next; // next occurence of 10:30next; // next Tuesday// all occurences of 10:00:00 in the next 5 daysconst d = ;;
Constructor takes a string notation (also see
;// every Wednesday at 10:30:00
Add frequency rules by specifying a unit and a value to fix it to and an optional scope.
fix parameter can also be an object containing 3 properties:
frequency;// each day at 10:00:00frequency;// each 30 minutes after the hour of the 6th day of each monthfrequency;// Sundays at midnightFrequencyfneven = even;frequency;// days of even weeks at midnight
Returns the next occurence of the frequency on or after the specified date. Please note that you are responsible for incrementing the date if you want to call
.next() multiple times to get consecutive occurences.
Returns all occurences of the frequency between (and including) the specified start and end date.
Returns a string notation of the frequency.
npm run lint.