/icalendar-rs

📆 icalendar library, in Rust of course - for fun

Primary LanguageRustOtherNOASSERTION

iCalendar in Rust

Travis license Crates.io version documentation maintenance contributors

A very simple library to generate rfc5545 calendars. Please double check the spec.

You want to help make this more mature? Please talk to me, Pull Requests and suggestions are very welcome.

Examples

let event = Event::new()
    .summary("test event")
    .description("here I have something really important to do")
    .starts(Utc::now())
    .class(Class::Confidential)
    .ends(Utc::now() + Duration::days(1))
    .append_property(Property::new("TEST", "FOOBAR")
            .add_parameter("IMPORTANCE", "very")
            .add_parameter("DUE", "tomorrow")
            .done())
    .done();

let bday = Event::new()
    .all_day(Utc.ymd(2020, 3, 15))
    .summary("My Birthday")
    .description(
r#"Hey, I'm gonna have a party
BYOB: Bring your own beer.
Hendrik"#
)
    .done();

let todo = Todo::new().summary("Buy some milk").done();


let mut calendar = Calendar::new();
calendar.push(event);
calendar.push(todo);
calendar.push(bday);

License

icalendar-rs is licensed under either of

at your option.

Contribution

Any help in form of descriptive and friendly issues or comprehensive pull requests are welcome!

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in icalendar-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.