so i have a script that gets information from google calendar.
var cal = CalendarApp.getCalendarById(calendarId);
var events = cal.getEventSeriesById(eventId);
var details = [[events.getTitle(), events.getDescription(), events.getStartTime(), events.getEndTime()]];
but whenever i try to run it, i get the error
TypeError: Cannot find function getStartTime in object CalendarEventSeries.
why doesn't it work?, .getStartTime is a function listed on google's own website
https://developers.google.com/apps-script/reference/calendar/calendar-event#getStartTime()
getStartTime is defined on the CalendarEvent class and not CalendarEventSeries. That's why you are getting the error. Please check the documentation -
CalendarEvent : https://developers.google.com/apps-script/reference/calendar/calendar-event CalendarEventSeries : https://developers.google.com/apps-script/reference/calendar/calendar-event-series
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.