def parse_iso_date(value):
    #NEEDS-TEST
    if not ISO_DATE_RE.match(value):
        raise InvalidFormat('invalid ISO-8601 date: "{}"'.format(value))
    try:
        return datetime(*time.strptime(value, '%Y-%m-%d')[:3]).date()
    except __HOLE__:
        raise InvalidDate('invalid date: "{}"'.format(value))
dataset/ETHPy150Open bendavis78/python-gitmodel/gitmodel/utils/isodate.py/parse_iso_date