RRuleJS-Swift
A wrapper around RRule for Javascript.
Installation
Cocoapods
RRulesJS-Swift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'RRulesJS-Swift'
Quick Start
RRuleJS:
let rruleString = "FREQ=WEEKLY;INTERVAL=1;WKST=MO;DTSTART=20190112T150000Z;DTEND=20120112T150000Z;BYDAY=MO,TU,WE,TH,FR"
if let rule = RRuleJS(rruleString: rruleString) {
let _ = rule.allOccurrences()
// first occurrence from the date specified
let _ = rule.after(new Date(), include: true)
// if the time has passed with-in the day, if include=true it would still return the day, otherwise it wouldn't
}
Contributing
There's still a lot of work to do here! I would love to see you involved. Waiting for PRs.
Authors
See LICENCE for more details.
Related projects
- https://rrules.com/ — RESTful API to get back occurrences of RRULEs that conform to RFC 5545.
- https://github.com/jakubroztocil/rrule rrule (Javascript)