2nd commit with improved date validation