Returns all events on a specific date.
class CalendarApp method .getEventsForDay()
CalendarApp is the Apps Script service.
.getEventsForDay() is the method name you will see after a dot in your code.
What it does
Why it's used
- Build a daily agenda email from today's calendar.
- See if a room is free on a specific date.
Common errors
- Forgetting parentheses on getEventsForDay. Write CalendarApp.getEventsForDay(), not CalendarApp.getEventsForDay or getEventsForDay by itself.
- Skipping dots between chained calls. Each step needs a dot, like CalendarApp.getEventsForDay().
- Adding spaces where they do not belong. Write CalendarApp.getEventsForDay(), not CalendarApp .getEventsForDay(), CalendarApp.getEventsForDay (), or CalendarApp . getEventsForDay().
- Wrong capitalization. Use CalendarApp and getEventsForDay, not calendarapp or geteventsforday.
Explore
Related methods
-
.getEvents()
Returns events in a calendar between two dates.
-
.createAllDayEvent()
Adds an all-day event to a calendar.
-
.getCalendarById()
Opens a calendar by its ID.
-
.createEvent()
Adds a timed event to a calendar.
-
.getDefaultCalendar()
Returns the user's primary Google Calendar.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about CalendarApp.getEventsForDay().