Break infinite loop on invalid date.