Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tyoro/33cd84e9f45c584cb088240ec6fff4c2 to your computer and use it in GitHub Desktop.
Save tyoro/33cd84e9f45c584cb088240ec6fff4c2 to your computer and use it in GitHub Desktop.
GAS でカレンダーの予定作成日時を調べるやつ
function myFunction() {
var e = getEvents(2019,5,18);
for(var i = 0; i < e.length; i++){
var text = e[i].getTitle() + " : " + e[i].getDateCreated();
Logger.log(text);
}
}
function getEvents(y,m,d){
var cal = getCalendar(); // カレンダーの取得
var date = new Date(y,m-1,d,0,0); // 指定日の取得
return cal.getEventsForDay(date);
}
function getCalendar(){
return CalendarApp.getCalendarById('hogehoge@gmail.com')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment