declaration of FigureOutStartAndEndHour function