#ical #outlook #google-calendar #office365

calendar-link

Rust library to generate an event link for Google Calendar, Yahoo! Calendar, Microsoft Outlook, etc

5 releases

Uses new Rust 2024

0.0.5 Jun 12, 2025
0.0.4 Jun 7, 2025
0.0.3 Jun 1, 2025
0.0.2 May 31, 2025
0.0.1 May 31, 2025

#339 in Date and time

Download history

230 downloads per month

MIT license

21KB
531 lines

Calendar Link

Rust library to generate an event link for Google Calendar, Yahoo! Calendar, Microsoft Outlook, etc.

Example

use calendar_link::prelude::*;

fn main() {
    let date = chrono::DateTime::parse_from_rfc3339("2019-12-29T00:00:00Z").unwrap();
    let evt = CalendarEvent {
        title: "Birthday party",
        start: EventTime::DateTime(TimeType::Utc(date.into())),
        duration: EventDuration::For(Duration::hours(2)),
        url: None,
        uid: None,
        desc: None,
        busy: None,
        stat: None,
        r_rule: None,
        guests: None,
        location: None,
        organizer: None,
    };
    let link = google(evt).unwrap();
    assert_eq!(
        link.as_str(),
        "https://calendar.google.com/calendar/render?action=TEMPLATE&dates=20191229T000000Z%2F20191229T020000Z&text=Birthday%20party".replace("%20", "+")
    );
}

the library heavily is under construction

Stages 1

  • Google calendar link
  • Outlook
  • Outlook Mobile
  • Office 365
  • Office 365 Mobile
  • Yahoo
  • AOL
  • MS Teams
  • iCalendar

LICENSE

MIT

Inspiration

This package draws inspiration from and is a port of the corresponding NPM package.

Dependencies

~3–5MB
~78K SLoC