public List < GoogleEntry > getEntries ( GoogleCalendar calendar , LocalDate startDate , LocalDate endDate , ZoneId zoneId ) throws IOException { if ( ! calendar . existsInGoogle ( ) ) { return new ArrayList <> ( 0 ) ; } ZonedDateTime st = ZonedDateTime . of ( startDate , LocalTime . MIN , zoneId ) ; ZonedDateTime et = ZonedDateTime . of ( endDate , LocalTime . MAX , zoneId ) ; String calendarId = URLDecoder . decode ( calendar . getId ( ) , "UTF-8" ) ; List < Event > events = dao . events ( ) . list ( calendarId ) . setTimeMin ( new DateTime ( Date . from ( st . toInstant ( ) ) ) ) . setTimeMax ( new DateTime ( Date . from ( et . toInstant ( ) ) ) ) . setSingleEvents ( false ) . setShowDeleted ( false ) . execute ( ) . getItems ( ) ; return toGoogleEntries ( events ) ; }
Gets a list of entries belonging to the given calendar defined between the given range of time . Recurring events are not expanded always recurrence is handled manually within the framework .