please include class GoogleAccess. import com.google.api.client.util.DateTime; import com.google.api.services.calendar.Calendar; import com.google.api.services.calendar.model.Event; import com.google.api.services.calendar.model.Events; static L googleCalendar_eventsInDateRange(Calendar calendarService, TimeZone tz, long startDate, long endDate, int maxEvents) { ret googleCalendar_eventsInDateRange(calendarService, tz, longRange(startDate, endDate), maxEvents); } static L googleCalendar_eventsInDateRange(Calendar calendarService, TimeZone tz, LongRange dateRange, int maxEvents) ctex { Events events = calendarService.events().list("primary") .setMaxResults(maxEvents) .setTimeMin(new DateTime(new java.util.Date(dateRange.start), tz)) .setTimeMax(new DateTime(new java.util.Date(dateRange.end), tz)) .setOrderBy("startTime") .setSingleEvents(true) .execute(); ret events.getItems(); }