CalendarApp.Newrecurrence
function createRecurringEvent() {
const Tstart = new Date('December 5, 2020 04:00:00 PM EST');
const Tstop = new Date('December 5, 2020 05:00:00 PM EST');
const CEUntil = new Date('January 10, 2021');
const recurrence = CalendarApp.newRecurrence()
const rule = recurrence.addWeeklyRule().until(CEUntil);
const exceptions = [ 'December 5, 2020', 'December 26, 2020' ];
exceptions.forEach(function(exception) {
rule.addDateExclusion(new Date(exception));
});
CalendarApp.getDefaultCalendar().createEventSeries(
'Recurring Event',
Tstart,
Tstop,
recurrence
);
}
Long Lion