diff --git a/README.md b/README.md index db5204f..3b250e7 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,22 @@ Simply use invoke the object and use the functions... `begin` and `end` need to be formatted in a way that is friendly to `Date()` +Recurring Events +---------------- +Recurring events can be added with the `rrule` object. + +`cal.addEvent(subject, description, location, begin, end, rrule)` + +The `rrule` object has the following properties: + +- `freq` : __Required.__ The frequency of event recurrence. Can be `DAILY`, `WEEKLY`, `MONTHLY`, or `YEARLY`. +- `until` : A date string representing the date on which to end repitition. Must be friendly to `Date()` +- `count` : Alternative to until. Repeat the event `count` times. Must be an integer +- `interval` : The interval of `freq` to recur at. For example, if `freq` is `WEEKLY` and `interval` is `2`, the event will repeat every 2 weeks. Must be an integer. + +The four properties described above are not exhaustive of recurrence rule capabilities. If extra functionality is required, you can set the `rrule.rule` property to a full recurrence rule string. In this case, none of the four properties described above are necessary. See [this page](http://www.kanzaki.com/docs/ical/rrule.html) for a description of recurrence rules. + + Example ------- * **[Demo](http://htmlpreview.github.io/?https://github.com/nwcell/ics.js/blob/master/demo/demo.html)**