Adding getEventsForTimePeriod method to retrieve events from a collection with a query