Example #1
0
 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)
Example #2
0
 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)