Sort events by both start and end dates