python get this week days and last week day maybe help for you
#!/usr/bin/envpython#encoding=utf-8importdatetimedefget_this_week_days(d=datetime.datetime.now()): d=d-datetime.timedelta(days=d.isoweekday()-1) day_begin=datetime.datetime(d.year,d.month,d.day,0,