Skip to content

Instantly share code, notes, and snippets.

@purintai
Last active October 4, 2016 13:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save purintai/c9a05eb7663e8f703ed61f4f2ec37fff to your computer and use it in GitHub Desktop.
Save purintai/c9a05eb7663e8f703ed61f4f2ec37fff to your computer and use it in GitHub Desktop.
function myFunction() {
var cals = CalendarApp.getAllCalendars();
for(var i=0; i<cals.length; i++){
Logger.log(cals[i].getName())
var events = cals[i].getEvents(new Date(2016, 1 ,1), new Date(2016, 12, 31))
for(var n=0; n<events.length; n++){
Logger.log(events[n].getTitle())
if (events[n].getLocation() == "東京都港区高輪") {
events[n].deleteEvent()
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment