SyntaxFix
Write A Post
Hire A Developer
Questions
another simplify version
lastBusDay = datetime.datetime.today() wk_day = datetime.date.weekday(lastBusDay) if wk_day > 4: #if it's Saturday or Sunday lastBusDay = lastBusDay - datetime.timedelta(days = wk_day-4) #then make it Friday