This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const now = new Date(); | |
const thirtyDaysFromNow = new Date(now.getTime() + (30 * 24 * 60 * 60 * 1000)); | |
const sourceCalendarIds = [] // array of ids of calendars you want to consolidate | |
const targetCalendarId = '' // string of your target calendar id (i.e. the calendar you want to consolidate events to) | |
const sourceCalendars = sourceCalendarIds.map(id => CalendarApp.getCalendarById(id)) | |
const targetCalendar = CalendarApp.getCalendarById('') | |
function sync() { |