

def last_month(arg=_date, clean=False):
    _arg = _datetime_to_date(arg)
    this_month_first_day = datetime.date(_arg.year, _arg.month, 1)
    last_month_last_day = (this_month_first_day - _ONE_DAY)
    last_month_first_day = datetime.date(last_month_last_day.year, last_month_last_day.month, 1)
    return (last_month_first_day, (last_month_last_day if clean else this_month_first_day))

dataset/ETHPy150Open shinux/PyTime/pytime/pytime.py last_month/original