Last active
June 22, 2021 00:35
-
-
Save tyoro/33cd84e9f45c584cb088240ec6fff4c2 to your computer and use it in GitHub Desktop.
GAS でカレンダーの予定作成日時を調べるやつ
This file contains 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 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