UNPKG

@barinbritva/add-to-calendar

Version:

[![Dependencies counter](https://img.shields.io/badge/dependencies-none-green?style=flat-square)](https://github.com/barinbritva/add-to-calendar/blob/master/package.json) [![License](https://img.shields.io/npm/l/micromatch?style=flat-square)](https://gith

21 lines (20 loc) 769 B
import { UrlGenerator } from './UrlGenerator'; export class Outlook extends UrlGenerator { constructor() { super(...arguments); this.urlBase = 'https://outlook.live.com/calendar/deeplink/compose'; } convertEventToQueryObject(event) { return { path: '/calendar/action/compose', rru: 'addevent', subject: event.title, startdt: event.getStartDateAsString(), enddt: event.getEndDateAsString(), body: event.description, location: event.locationName, allday: event.isAllDayEvent() ? String(event.isAllDayEvent()) : undefined, to: event.hasAttendees() ? this.convertAttendeesToString(event.attendees) : undefined }; } }