| Crates.io | calendar-link |
| lib.rs | calendar-link |
| version | 0.0.5 |
| created_at | 2025-05-31 17:56:22.882449+00 |
| updated_at | 2025-06-12 17:58:27.822702+00 |
| description | Rust library to generate an event link for Google Calendar, Yahoo! Calendar, Microsoft Outlook, etc. |
| homepage | |
| repository | https://github.com/raeisimv/calendar-link.git |
| max_upload_size | |
| id | 1696515 |
| size | 53,064 |
Rust library to generate an event link for Google Calendar, Yahoo! Calendar, Microsoft Outlook, etc.
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
MIT
This package draws inspiration from and is a port of the corresponding NPM package.