JavaScript library to generate an event link for Google Calendar, Yahoo! Calendar, Microsoft Outlook, etc.
import { google, outlook, yahoo, ics } from "calendar-link";
// Set event as an object
const event = {
title: "My birthday party",
description: "Be there!",
start: "2019-12-29 18:00:00 +0100",
duration: [3, "hour"]
};
// Then fetch the link
google(event); // https://calendar.google.com/calendar/render...
outlook(event); // https://outlook.live.com/owa/...
yahoo(event); // https://calendar.yahoo.com/?v=60&title=...
ics(event); // standard ICS calendar base on https://icalendar.org/
Property | Description | Allowed values |
---|---|---|
title π |
Event title | String |
start π |
Start time | JS Date / ISO 8601 string / Unix Timestamp |
end π€ |
End time | JS Date / ISO 8601 string / Unix Timestamp |
duration π€ |
Event duration | Array with value (Number) and unit (String) |
allDay π€ |
All day event | Boolean |
description π |
Information about the event | String |
location π |
Event location in words | String |
busy π |
Mark on calendar as busy? | Boolean |
guests π€ |
Emails of other guests | Array of emails (String) |
The duration
field is ignored if allDay
is used.
Emoji | Meaning |
---|---|
π | Required |
π€ | Any one is required |
π | Supported but not required |
π€ | Not all calendars support |
MIT Β© Anand Chowdhary
Thanks goes to these wonderful people (emoji key):
Anand Chowdhary π» π |
Harry Lachenmayer π» π |
Alexandru-Ionut Imbrea π» |
Kamran Gh π» |
Paul Hebert π π» |
Osman Mazinov π |
This project follows the all-contributors specification. Contributions of any kind welcome!