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
function sync() { | |
var id="XXXXXXXXX"; // CHANGE - id of the secondary calendar to pull events from | |
var today=new Date(); | |
var enddate=new Date(); | |
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time | |
today.setDate(today.getDate()-7); //how many days in the past to retroactivly update changes | |
var secondaryCal=CalendarApp.getCalendarById(id); |