def thanks(year=None):
    """
    4rd Thursday in Nov
    :param year: int
    :return: Thanksgiving Day
    """
    nov_first = datetime.date(_year, 11, 1) if not year else datetime.date(int(year), 11, 1)
    weekday_seq = nov_first.weekday()
    if weekday_seq > 3:
        current_day = 32 - weekday_seq
    else:
        current_day = 25 - weekday_seq
    return datetime.date(nov_first.year, 11, current_day)
dataset/ETHPy150Open shinux/PyTime/pytime/pytime.py/thanks/original