def parse_iso_date(value: str) -> date:
    if (not ISO_8601_DATE_REGEX.match(value)):
        raise ValueError('Passed value is not valid ISO-8601 date.')
    date_parts = ISO_8601_DATE_REGEX.findall(value)[0]
    return date(year=int(date_parts[0]), month=int(date_parts[1]), day=int(date_parts[2]))
def parse_iso_date(value: str) -> date:
    if (not ISO_8601_DATE_REGEX.match(value)):
        raise ValueError('Passed value is not valid ISO-8601 date.')
    date_parts = ISO_8601_DATE_REGEX.findall(value)[0]
    return date(year=int(date_parts[0]), month=int(date_parts[1]), day=int(date_parts[2]))