def last_week(): """ Return start and end date of the last week. """ since = TODAY + delta(weekday=MONDAY(-2)) until = since + delta(weeks=1) return Date(since), Date(until)
def this_week(): """ Return start and end date of the current week. """ since = TODAY + delta(weekday=MONDAY(-1)) until = since + delta(weeks=1) return Date(since), Date(until)