Recently I had two use cases that I needed to implement for my company. To give a bit of context we are providing links between users and sports coaches that are organizing sports sessions.

When a user books a session it could be nice to have a reminder of this event in its agenda.

  • Users should have a button to add some events to their personal calendar (Outlook, Google Calendar, iOS calendar, …) on the website.
  • When having booked for an event, they have to receive something by e-mail to add this event to their calendar.

At first glance, it looks pretty simple but when you have no knowledge about how this works it’s a bit awkward.

Depending on the calendar provider, the technique gets a bit different, some are just URL based and some others require a file with a specific format.

After searching on the topic, I’ve come to the conclusion that for Google it’s pretty straightforward and you just need to build a specific URL.

For Apple calendars and Outlook you need a .icsfile, which is a special file that is handled by such calendar apps.

#software-development #programming #javascript #nodejs

How to Generate Calendar Events Programmatically for Browser and NodeJS using JavaScript?
6.25 GEEK