Ensure that the date is always valid