以下代码假设从 Google 日历获取 7 月份的事件
// The code below will retrieve all the events for the user's default calendar and
// display the description of the first event
var cal = CalendarApp.getDefaultCalendar();
Logger.log(cal.getName());
var events = cal.getEvents(new Date("July 01, 2012 EST"), new Date("July 30, 2012 EST"));
if (events[0]) {
Logger.log(events[0].getDescription());
}
else
{
Logger.log("No events found");
}
但它只打印“未找到事件”,
我验证了日历名称,它得到了正确的日历,但没有得到事件
还有什么要验证的吗?