Now checks if the date is in a correct format.