Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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