#calendar #ical #rrule

rrule

A pure Rust implementation of recurrence rules as defined in the iCalendar RFC

15 releases

0.3.4 Nov 13, 2020
0.3.3 Nov 6, 2020
0.3.0 Oct 31, 2020
0.2.8 Oct 27, 2020
0.1.0 Oct 16, 2020

#44 in Date and time

Download history 14/week @ 2020-10-15 115/week @ 2020-10-22 59/week @ 2020-10-29 77/week @ 2020-11-05 36/week @ 2020-11-12 10/week @ 2020-11-19

91 downloads per month

MIT license

115KB
3K SLoC

RRule.rs

A pure and efficient Rust implementation of recurrence rules as defined in the iCalendar RFC..

Warning

This crate is not production ready yet. Dates and recurrence rules are quite complicated and takes time to get right. Even though this crate is well tested (high code coverage), there are still tests missing regarding edge cases in stuff like DST, time zone and rfc_string parsing (contributions are very welcome!). Use at your own risk!

Quick start

extern crate rrule;

use rrule::RRule;

// RRule that starts 2012.02.01 and occurs daily for 3 days.
let mut rrule: RRule = "DTSTART:20120201T093000Z\nRRULE:FREQ=DAILY;COUNT=3".parse().unwrap();

// Get all recurrences of the rrule
let recurrences = rrule.all();
assert_eq!(recurrences.len(), 3);

Documentation and more examples

Documentation and more examples

License

This project is licensed under the MIT license.

Inspired by

TODOS

  • cache
  • more tests around string parsing and validation

Dependencies

~3MB
~60K SLoC