This small library allows you tocheck if a date is within a range. Support includes repeating ranges using the ISO 8601 standards of Durations and Repeating Intervals.
This can be supplied a range with describes a duration at a repeating interval (for example between 9:15 and 4 every other Thursday) and can tell you if a date falls within one of those ranges.
var IntervalRecurrence = ;var range =interval: '2015-07-22T00:00:00.000Z/P1D'recurrence: 'R/P1W';var every_wednesday = range;var wednesday = '2015-07-29T13:00:00.000Z';var tuesday = '2015-07-23T11:12:13.000Z';every_wednesday; // trueevery_wednesday; // false
Although I will write some more documentation later, for now you can see the unit testing to determine how to use it.
The guys over at cylc seemed to have the same problem but came up with a complicated and extremely confusing solution.