Use the same logic for testing for date format