@devash/repeat-weekly-date
v1.0.1
Published
Get next date from an array of days for a event date
Downloads
8
Readme
[Repeat-weekly-date]
A JavaScript package that will get the next event date for a repeat event in a week.
Installation
npm i @devash/repeat-weekly-date
Example
/**
- Dates array reference - [sun,mon,tue,wed,thu,fri,sat] == [0,1,2,3,4,5,6]
- event time - utc event time and must be in 24 hours format */
import { getNextWeeklyRepeatEventDate } from "@devash/repeat-weekly-date";
let dates_arr = [0, 1, 4, 5, 6]; // let event_time = '1020'; let nextweekdate = getNextWeeklyRepeatEventDate(dates_arr, event_time); console.log("Next event date is", nextweekdate);
How to use
This is a legacy project, now in maintenance mode. In most cases, you should choose a different library.
Thank you.
License
Repeat-weekly-date is freely distributable under the public licence.