Correct date algo when start and end in the same day