def parse_iso8601_date(string):
<EOL>match = _RE_ISO8601_DATE.search(string)<EOL>if not match:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>year = int(match.group('<STR_LIT>'))<EOL>month = int(match.group('<STR_LIT>'))<EOL>day = int(match.group('<STR_LIT>'))<EOL>return date(year, month, day)<EOL>
Parse an ISO 8601 date string