def month_boundaries(dt=None):
    dt = dt or date.today()
    wkday, ndays = calendar.monthrange(dt.year, dt.month)
    start = datetime(dt.year, dt.month, 1)
    return (start, start + timedelta(ndays - 1))


#-------------------------------------------------------------------------------
Encode and sign a pickle-able object. Return a (byte) string
dataset/ETHPy150Open dakrauth/django-swingtime/swingtime/utils.py/month_boundaries--crossover with--dataset/ETHPy150Open Arelle/Arelle/arelle/webserver/bottle.py/cookie_encode