

def parse_date(text):
    for fmt in DATE_FORMATS:
        try:
            return datetime(*time.strptime(text, fmt)[:6])
        except ValueError:
            continue
    raise ValueError(('Unable to parse time data %r.' % text))

dataset/ETHPy150Open ecdavis/pants/pants/http/utils.py parse_date/original