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.
$ npm install --save rrule-to-webex
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>
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.
- dayInYear is deprecated, thus is not supported by this module
Returns a XML tree defined by the WebEx repeat schema.
Type: string
(iCalendar RFC String) || object
(RRule.js Object)
The iCalendar String or RRule.js object to be converted
rrule-to-webex
also provides access to particular RRule conversion methods for custom uses and individual part conversion.
Type: RRule.[WEEKlY, DAILY, MONTHLY, YEARLY]
Type: number
Range: 1 ... 999
Type: number
Range: 1 .. 99
Type: RRule.[MO, TU, WE, TH, FR, SA]
Range: 1 .. 99
Type: number
Range: 1 .. 99
Uses
moment.js
to parse date strings
Type: date object
|| date string
(ISO 8601, RFC 2822, new Date(dateString)
)
If you found this client useful, don't forget to star this repository and check other related open-source Cisco modules by the Innovation Edge team:
- webex-api-client - A node module to simplify interacting with Cisco WebEx XML-based APIs from the browser or server
- cisco-tp-client - A node API client to ease interactions with Cisco WebEx Telepresence-enabled endpoints / codecs
- webex-time-zones - 🌐 An enumerated list of Cisco WebEx supported time zones
- webex-date - 🕰 Convert a JavaScript date type, RFC 2822, ISO-8601 to the WebEx XML API supported format.
- webex-enum-types - 🍭 A JSON mapping of enumerated types for Cisco's WebEx XML API
MIT © Cisco Innovation Edge