Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

calendar-link

AnandChowdhary364.2kMIT2.10.0TypeScript support: included

πŸ“… Calendar link generator for popular services, like Google, Outlook, and Yahoo.

nodejs, typescript, calendar, calendar-link, google-calendar, outlook, yahoo

readme

πŸ“… Calendar Link

| | Status | | - | - | | Build | GitHub Actions Workflow Status Dependencies GitHub release (latest by date) | | Health | License Coverage | | Community | NPM type definitions NPM GitHub contributors |

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

NPM

Usage

// Usage with Node.js
const { google, outlook, office365, yahoo, ics } = require("calendar-link");

// Usage with TypeScript or ES6
import { google, outlook, office365, 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/...
office365(event); // https://outlook.office.com/owa/...
yahoo(event); // https://calendar.yahoo.com/?v=60&title=...
ics(event); // standard ICS file based on https://icalendar.org

Options

Property Description Allowed values
title (required) Event title String
start (required) 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
rRule Recurring event iCal recurrence rule string
NOTE: Only supported by google and ics
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)
url Calendar document URL String

Notes

  • Any one of the fields end, duration, or allDay is required.
  • The allowed units in duration are listed here: https://day.js.org/docs/en/durations/creating#list-of-all-available-units.
  • The url field defaults to document.URL if a global document object exists. For server-side rendering, you should supply the url manually. Not all calendars support the guests and url fields.
  • If you don't pass the start and end time in UTC, Google will convert it to UTC but Outlook won't, so it's a good idea to use UTC when passing dates and times
  • There are some known issues in Office 365 because of which we can't generate a consistent link in all devices (#542)

Compatibility

This package uses URLSearchParams (Node.js >= 10, 97%+ browsers), but if you need to include a polyfill, you can include url-search-params-polyfill first.

License

MIT Β© Anand Chowdhary

changelog

v2.10.0 (2025-05-20)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

  • a9581ed Add support for ICS file's UID field

v2.9.0 (2025-05-19)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

  • dfd7975 Set ics PRODID correctly (#621) (Issues: #621)

πŸ› Bug fixes

  • 194118a Events without end should not necessarily end "now" (#622) (Issues: #622)

⬆️ Dependency updates

  • dd4bc49 Upgrade dependencies and workflows for improved CI performance

v2.8.0 (2024-12-23)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

  • 581db9f Add status X-MICROSOFT for allDay support

v2.7.0 (2024-07-31)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

  • 003905a Add Microsoft Teams Calendar Event Generation Feature (#604) (Issues: #604)

v2.6.1 (2024-07-31)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

πŸ› Bug fixes

  • 6da873c Fix Snapshot Tests for ICS Links (#600) (Issues: #600)

v2.6.0 (2023-09-29)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

v2.5.1 (2023-07-19)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

πŸ› Bug fixes

  • e4a2eaa Fix ICS file generation with CLRF and absent fields (#553) (Issues: #553)

v2.5.0 (2023-07-12)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

v2.4.0 (2022-10-21)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

  • 9b3efb4 Add support for local time in Outlook and Office365

⬆️ Dependency updates

  • 4d551e8 Bump parse-path from 4.0.2 to 7.0.0 (#488) (Issues: #488)- dc0df9e Bump actions/setup-node from 2.1.5 to 3.5.1 (#486) (Issues: #486)- da3fa08 Bump actions/checkout from 2.3.4 to 3.1.0 (#485) (Issues: #485)- 6756c4b Bump typescript from 4.2.3 to 4.8.4 (#481) (Issues: #481)- c184373 Bump actions/stale from 3 to 6 (#478) (Issues: #478)- 7ea8657 Bump ansi-regex, ansi-regex and ansi-regex (#490) (Issues: #490)- 5755074 Bump actions/cache from 2 to 3.0.11 (#493) (Issues: #493)

v2.3.1 (2022-10-20)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

πŸ› Bug fixes

  • 339e6e4 missing RRULE prefix for google (#489) (Issues: #489)

v2.3.0 (2022-10-19)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

v2.2.0 (2022-05-16)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

v2.1.1 (2021-04-16)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

πŸ› Bug fixes

  • 7ff87dc Add docs for units (fixed #286) (Issues: #286)

v2.1.0 (2021-04-15)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

✨ New features

  • 376ae97 Deploy new UMD/ES modules

v2.0.16 (2021-03-08)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • c1741d1 Bump query-string from 6.14.0 to 6.14.1
  • 7cb3493 Bump semantic-release from 17.4.0 to 17.4.1
  • 22a79d2 Bump typescript from 4.2.2 to 4.2.3
  • a6bfe2a Bump ts-jest from 26.5.2 to 26.5.3

v2.0.15 (2021-03-01)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 4dc96f3 Bump actions/setup-node from v2.1.4 to v2.1.5
  • 74e463b Bump typescript from 4.1.5 to 4.2.2
  • cd9e252 Bump ts-jest from 26.5.1 to 26.5.2
  • e1fc524 Bump semantic-release from 17.3.9 to 17.4.0

v2.0.14 (2021-02-22)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • bffd4aa Bump semantic-release from 17.3.8 to 17.3.9
  • 654d5eb Bump vsoch/pull-request-action from 1.0.13 to 1.0.14
  • 3f28822 Bump pascalgn/automerge-action from v0.13.0 to v0.13.1
  • dbd5da9 Bump vsoch/pull-request-action from 1.0.14 to 1.0.15

v2.0.13 (2021-02-15)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • e78919b Bump semantic-release from 17.3.7 to 17.3.8
  • e3f8340 Bump ts-jest from 26.5.0 to 26.5.1
  • 8eaf178 Bump typescript from 4.1.3 to 4.1.4
  • d00ae83 Bump query-string from 6.13.8 to 6.14.0
  • e86754a Bump typescript from 4.1.4 to 4.1.5

v2.0.12 (2021-02-08)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • e0e9942 Bump ts-jest from 26.4.4 to 26.5.0

v2.0.11 (2021-02-01)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 7d1d848 Bump dayjs from 1.10.3 to 1.10.4
  • 20c87ca Bump semantic-release from 17.3.6 to 17.3.7

v2.0.10 (2021-01-25)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 98bd892 Bump semantic-release from 17.3.2 to 17.3.3
  • 927646c Bump @semantic-release/npm from 7.0.9 to 7.0.10
  • 57d7bc3 Bump semantic-release from 17.3.3 to 17.3.4
  • 08299b8 Bump semantic-release from 17.3.4 to 17.3.6

v2.0.9 (2021-01-18)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • f4a33a7 Bump dayjs from 1.10.2 to 1.10.3
  • c593b68 Bump semantic-release from 17.3.1 to 17.3.2

v2.0.8 (2021-01-11)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 70dccdb Bump dayjs from 1.9.8 to 1.10.1
  • cefc6f3 Bump dayjs from 1.10.1 to 1.10.2
  • b38bb28 Bump @types/jest from 26.0.19 to 26.0.20

v2.0.7 (2021-01-04)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 9ea5f1f Bump dayjs from 1.9.7 to 1.9.8
  • 57deca6 Bump semantic-release from 17.3.0 to 17.3.1
  • d309356 Bump query-string from 6.13.7 to 6.13.8

v2.0.6 (2020-12-28)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 96a46eb Bump vsoch/pull-request-action from 1.0.12 to 1.0.13
  • afabdce Bump pascalgn/automerge-action from v0.12.0 to v0.13.0

v2.0.5 (2020-12-21)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 03b581f Bump typescript from 4.1.2 to 4.1.3
  • 5a098e5 Bump actions/setup-node from v2.1.3 to v2.1.4

v2.0.4 (2020-12-14)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 454f6d5 Bump dayjs from 1.9.6 to 1.9.7
  • d658954 Bump @types/jest from 26.0.16 to 26.0.17
  • e89c536 Bump @types/jest from 26.0.17 to 26.0.18
  • d75c79b Bump @types/jest from 26.0.18 to 26.0.19
  • 3f5cb35 Bump actions/setup-node from v2.1.2 to v2.1.3
  • ac8f283 Bump ini from 1.3.5 to 1.3.7

v2.0.3 (2020-12-07)

πŸ“ Release notes Β· πŸ’» Compare Β· πŸ”– Tag Β· πŸ—„οΈ Archive (zip Β· tar.gz)

⬆️ Dependency updates

  • 5f507d8 Bump @types/jest from 26.0.15 to 26.0.16
  • db9f07d Bump @koj/config from 1.2.9 to 1.2.11
  • 2a1a283 Bump @semantic-release/npm from 7.0.8 to 7.0.9

v2.0.2 (2020-11-30)

⬆️ Dependency updates

  • 066b3dd Bump semantic-release from 17.2.4 to 17.3.0

v2.0.1 (2020-11-23)

⬆️ Dependency updates

  • 7666634 Bump query-string from 6.13.5 to 6.13.6
  • 925ba7f Bump jest from 26.5.3 to 26.6.0
  • a06c6ed Bump @types/jest from 26.0.14 to 26.0.15
  • f130e0d Bump vsoch/pull-request-action from 1.0.10 to 1.0.11
  • fb33dd2 Bump jest from 26.6.0 to 26.6.1
  • 43a869a Bump dayjs from 1.9.3 to 1.9.4
  • d602964 Bump ts-jest from 26.4.1 to 26.4.3
  • 4f4b551 Bump typescript from 4.0.3 to 4.0.5
  • 38cdadf Bump @koj/config from 1.2.5 to 1.2.6
  • e88438c Bump @koj/config from 1.2.6 to 1.2.7
  • b146cd7 Bump semantic-release from 17.2.1 to 17.2.2
  • 156dbe1 Bump jest from 26.6.1 to 26.6.2
  • 7b20e30 Bump actions/checkout from v2.3.3 to v2.3.4
  • 9a4e975 Bump @koj/config from 1.2.7 to 1.2.8
  • 912ecac Bump jest from 26.6.2 to 26.6.3
  • 49cd32b Bump query-string from 6.13.6 to 6.13.7
  • 4dd597e Bump dayjs from 1.9.4 to 1.9.5
  • ecb28b0 Bump ts-jest from 26.4.3 to 26.4.4
  • 88da0d7 Bump dayjs from 1.9.5 to 1.9.6
  • 4490ea7 Bump @semantic-release/github from 7.1.1 to 7.1.2
  • d959618 Bump semantic-release from 17.2.2 to 17.2.3
  • 47a61d2 Bump @semantic-release/npm from 7.0.6 to 7.0.8
  • fc6a455 Bump @koj/config from 1.2.8 to 1.2.9
  • b7ffeb5 Bump @semantic-release/github from 7.1.2 to 7.2.0
  • e0e599a Update koj-co/template
  • 7a5e25c Bump semantic-release from 17.2.3 to 17.2.4
  • 237d0a4 Bump typescript from 4.0.5 to 4.1.2

v2.0.0 (2020-10-17)

πŸ’₯ Breaking changes

v1.0.0 (2020-10-17)

✨ New features

  • 5fb280f Add Google link generator
  • c1b3875 Add Outlook and Yahoo! Calendar
  • d10afa6 Add all day events & improve timezone handling
  • 34e70d3 Allow all day events spanning multiple days
  • 6f820e1 Trigger major release

♻️ Updates

  • 793ac2e Use query-string instead of querystring

πŸ› Bug fixes