CogniPrep tracks application deadlines, and a deadline is only useful in the calendar the candidate actually looks at. We publish one ICS feed per account. The hard part was never generating the file. It was the handoff: getting a URL into Apple Calendar, Google Calendar and Outlook, each of which wants something different.
The whole handoff is 47 lines with no imports.
Five strings from one
export function calendarSubscriptionLinks ( feedUrl : string ) : CalendarSubscriptionLinks { const webcal = feedUrl . replace ( /^ https ?: \ / \ //, 'webcal://'); return { url : feedUrl , webcal , google : `https://calendar.google.com/calendar/render?cid=${encodeURIComponent(webcal)}` , outlook : outlookAddFromWeb ( 'outlook.live.com' , webcal ) , office365 : outlookAddFromWeb ( 'outlook.office.com' , webcal ) , } ; }
Enter fullscreen mode
Exit fullscreen mode
That is the entire module's logic.…