def week_start(d):
    d = d - timedelta(d.isoweekday() - 1)
    return datetime(d.year, d.month, d.day, 0, 0, 0)
Weeks start on the Monday on or before the given date
dataset/ETHPy150Open mozilla/standup/standup/apps/status/helpers.py/week_start