Bloomberg interview question

Write a simple program to get consecutive timeslots from the schedule.