Skip to content

Instantly share code, notes, and snippets.

@KiaraGrouwstra
Last active April 3, 2021 21:01
Show Gist options
  • Save KiaraGrouwstra/11040b86f4b31c2d1b3f29d9f16cc271 to your computer and use it in GitHub Desktop.
Save KiaraGrouwstra/11040b86f4b31c2d1b3f29d9f16cc271 to your computer and use it in GitHub Desktop.
calendar links
// https://npm.runkit.com/calendar-link
const { google, outlook, office365, yahoo, ics } = require("calendar-link");
const event = {
start: "2021-12-31 18:00:00 +0200",
duration: [1, "hour"],
title: "",
location: "",
description: "",
};
Object.entries({google,outlook,office365,yahoo/*,ics*/}).map(([k,v]) => `<a href="${v(event)}">${k}</a>`).join(', ');
// correction: just use addevent.com to get a single link for everything.
// (or datumprikker.nl if you're dutch.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment