def gsx_date(value):
    try:
        # standard GSX format: "mm/dd/yy"
        return datetime.strptime(value, "%m/%d/%y").date()
    except ValueError:
        pass

    try:
        # some dates are formatted as "yyyy-mm-dd"
        return datetime.strptime(value, "%Y-%m-%d").date()
    except (ValueError, __HOLE__):
        pass
dataset/ETHPy150Open filipp/py-gsxws/gsxws/objectify.py/gsx_date