ezcal 0.3.4

Ergonomic iCalendar + vCard library for Rust
Documentation
use ezcal::ical::{Alarm, Calendar, Event, RecurrenceRule, Todo};

fn main() {
    // Create a simple one-off event
    let cal = Calendar::new()
        .name("My Calendar")
        .event(
            Event::new()
                .summary("Team Standup")
                .description("Daily standup meeting to discuss progress and blockers.")
                .location("Room 42")
                .starts("2026-03-15T09:00:00")
                .ends("2026-03-15T09:30:00")
                .add_category("MEETING")
                .alarm(Alarm::display("-PT15M", "Standup in 15 minutes")),
        )
        // Add a recurring event
        .event(
            Event::new()
                .summary("Weekly Review")
                .starts("2026-03-16T14:00:00")
                .ends("2026-03-16T15:00:00")
                .rrule(RecurrenceRule::parse("FREQ=WEEKLY;BYDAY=MO;COUNT=52").unwrap()),
        )
        // Add a todo
        .todo(
            Todo::new()
                .summary("Prepare quarterly report")
                .due_date("2026-03-31")
                .priority(1)
                .status("NEEDS-ACTION"),
        )
        .build();

    // Print the .ics output
    println!("{}", cal);

    // In a real app, you'd write to a file:
    // std::fs::write("meeting.ics", cal.to_string()).unwrap();
}