public List <Event> GetUpcomingEvents(bool active = true) { List <Event> events = null; // limit upcoming events to those within the next 10 days. DateTime limit = DateTime.Today.AddDays(10.0); int limitDay = limit.Day; int limitMonth = limit.Month; int limitYear = limit.Year; // make sure it is formatted for Sql string limitDate = limitMonth + "-" + limitDay + "-" + limitYear; try { events = EventAccessor.RetrieveUpcomingEvents(limitDate, active); formatTimeForEvents(events); } catch (Exception) { throw; } return(events); }