Skip to content

Instantly share code, notes, and snippets.

Will wroman

  • Austin, TX
Block or report user

Report or block wroman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
wroman / calendarblock
Last active Sep 4, 2018
Auto Block Time on Primary Google Calendar from Events on Secondary Calendar - Instructions:
View calendarblock
function sync() {
var id="XXXXXXXX"; // CHANGE - id of the secondary calendar to pull events from
var secondaryCal=CalendarApp.getCalendarById(id);
var today=new Date();
var enddate=new Date();
enddate.setDate(today.getDate()+30); // how many days in advance to monitor and block off time
var secondaryEvents=secondaryCal.getEvents(today,enddate);
You can’t perform that action at this time.