Add a check for the date format