Skip to content

Latest commit

 

History

History
82 lines (63 loc) · 5.33 KB

README.md

File metadata and controls

82 lines (63 loc) · 5.33 KB

Calendar Link

Travis Coverage Status GitHub Vulnerabilities NPM type definitions NPM All contributors

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

NPM

Usage

import { google, outlook, yahoo, ics } from "calendar-link"

// Set event as an object
const event = {
  title: "My birthday party",
  description: "Be there!",
  starts: "2019-12-29 18:00:00 +0100",
  duration: [3, "hour"]
};

// Then fetch the link
google(event); // https://calendar.google.com/calendar/render...
outook(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/

Options

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.

Support key

Emoji Meaning
👍 Required
🤙 Any one is required
👌 Supported but not required
🤞 Not all calendars support

License

MIT © Anand Chowdhary

Contributors

Thanks goes to these wonderful people (emoji key):

Anand Chowdhary
Anand Chowdhary

💻 📖
Harry Lachenmayer
Harry Lachenmayer

💻 📖
Alexandru-Ionut Imbrea
Alexandru-Ionut Imbrea

💻
Kamran Gh
Kamran Gh

💻
Paul Hebert
Paul Hebert

🐛 💻

This project follows the all-contributors specification. Contributions of any kind welcome!