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

20 lines (19 loc) 713 B
import { StringHelper } from '../Utils/StringHelper'; import { UrlGenerator } from './UrlGenerator'; export class Yahoo extends UrlGenerator { constructor() { super(...arguments); this.urlBase = 'https://calendar.yahoo.com/'; } convertEventToQueryObject(event) { return { v: '60', title: event.title, st: StringHelper.clearPunctuation(event.getStartDateAsString()), et: StringHelper.clearPunctuation(event.getEndDateAsString()), desc: event.description, in_loc: event.locationName, inv_list: event.hasAttendees() ? this.convertAttendeesToString(event.attendees) : undefined }; } }