rrule-to-webex
v0.1.0
Published
Converts iCalendar RFC-5545 recurrence rule to Cisco'ss WebEx recurrence XML tree
Downloads
3
Maintainers
Readme
rrule-to-webex
Converts iCalendar RFC-5545 recurrence rule to Cisco's WebEx XML
<repeat>
XML sub tree
This module uses RRule.js
to process iCalendar RFC RRule strings, therefore it also supports the ability to create <repeat>
trees with RRule.js
's objects. It's recommended to please go over the documentation to understand some of the differences between iCalendar RFC.
Install
$ npm install --save rrule-to-webex
Usage
const convert = require('rrule-to-webex');
const RFCString = "FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR";
convert(RFCString);
// === Output ===
// <repeat>
// <repeatType>WEEKLY</repeatType>
// <interval>5</interval>
// <expirationDate>01/30/2013 17:00:00</expirationDate>
// <dayInWeek>
// <day>MONDAY</day>
// <day>FRIDAY</day>
// </dayInWeek>
// </repeat>
Supported RFC Reccur Parts
WebEx only supports a subset of the available (RFC iCalendar Recurrence parts](https://tools.ietf.org/html/rfc5545#section-3.3.10), this module attempts to map the available properties as defined in the repeat
schema below to their iCalendar counter parts.
Caveats:
- dayInYear is deprecated, thus is not supported by this module
API
rruleToWebEx(RRule)
Returns a XML tree defined by the WebEx repeat schema.
RRule
Type: string
(iCalendar RFC String) || object
(RRule.js Object)
The iCalendar String or RRule.js object to be converted
Specific Methods
rrule-to-webex
also provides access to particular RRule conversion methods for custom uses and individual part conversion.
.freq(frequencyTypes)
frequencyTypes
Type: RRule.[WEEKlY, DAILY, MONTHLY, YEARLY]
.count(number)
number
Type: number
Range: 1 ... 999
.interval(number)
number
Type: number
Range: 1 .. 99
.byweekday(weekday)
weekday
Type: RRule.[MO, TU, WE, TH, FR, SA]
Range: 1 .. 99
.bymonthday(number)
number
Type: number
Range: 1 .. 99
.until(date)
date
Uses
moment.js
to parse date strings
Type: date object
|| date string
(ISO 8601, RFC 2822, new Date(dateString)
)
Stellaris Related Modules
This project is part of the Stellaris Ecosystem ✨, where you can find similar Cisco Collaboration modules to help facilitate in your development projects.
- cisco-tp-client - A Node.js API client to interact with Cisco TelePresence endpoints/codecs (sx series, dx series, ex series)
- tp-json-formatter - A module that formats HTTP Feedback JSON responses from Cisco TelePresence units in a simpler, flatter JSON format.
License
MIT © Cisco Innovation Edge