# @philippdormann/calendar-link

> 📅 Calendar link generator for popular services, like Google, Outlook, and Yahoo.

Latest version **2.6.2** (published 2023-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @philippdormann/calendar-link
pnpm add @philippdormann/calendar-link
yarn add @philippdormann/calendar-link
bun add @philippdormann/calendar-link
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.6.2 |
| Published | 2023-06-30 |
| First published | 2023-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | philippdormann |
| Keywords | nodejs, typescript, calendar, calendar-link, google-calendar, outlook, yahoo |

## Links

- npm: https://www.npmjs.com/package/@philippdormann/calendar-link
- Repository: https://github.com/philippdormann/calendar-link
- Homepage: https://github.com/philippdormann/calendar-link#readme
- Issues: https://github.com/philippdormann/calendar-link/issues
- npm.io page: https://npm.io/package/@philippdormann/calendar-link

## Dependencies (2)

- [dayjs](https://npm.io/package/dayjs.md) 1.11.8
- [query-string](https://npm.io/package/query-string.md) 8.1.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.6.2 (latest) — 2023-06-30
- 2.6.1 — 2023-06-30
- 2.6.0 — 2023-06-30
- 2.5.2 — 2023-06-30
- 2.5.1 — 2023-06-30
- 2.5.0 — 2023-06-30

## README

# 📅 Calendar Link
### Usage

```js
// Usage with TypeScript or ES6
import { google, outlook, office365, yahoo, ics } from "@philippdormann/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](https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10) string <br />**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

---
_Source: https://npm.io/package/@philippdormann/calendar-link · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
