4.1.0 • Published 2 years ago
@mackgevanni/rrule-es6 v4.1.0
rrule-es6
Installation
npm i @mackgevanni/rrule-es6
ES6 import
import { RRule, RRuleSet, rrulestr } from '@mackgevanni/rrule-es6';
const options = {
freq: RRule.WEEKLY,
dtstart: new Date(Date.UTC(2022, 5, 1, 10, 30)),
until: new Date(Date.UTC(2022, 12, 31))
};
// RRule
const rrule = new RRule(options);
// RRuleSet
const rrule_set = new RRuleSet();
rrule_set.rrule(new RRule(options));
// rrulestr
const rrulestr_default_options = rrulestr(
'DTSTART:20220501T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5',
);
Important
The official library is RRule.js (Github | npm).
This package is just a wrapper around that excellent library to achieve ES6 import syntax while running Node 16 + TypeScript V4. More info: