fix breakage on sunday
This commit is contained in:
parent
c8f8045022
commit
034bf2129a
1 changed files with 4 additions and 2 deletions
|
@ -36,9 +36,11 @@ class DudleBot:
|
|||
update.message.reply_text("There's a plan unresolved still! (Speak /endplan to fix it.)")
|
||||
return
|
||||
|
||||
today = datetime.today()
|
||||
|
||||
periods = {
|
||||
'thisweek': datetime.today() - timedelta(days=datetime.today().weekday() % 6),
|
||||
'nextweek': datetime.today() + timedelta(days=7) - timedelta(days=datetime.today().weekday() % 6)
|
||||
'thisweek': today - timedelta(days=today.weekday()),
|
||||
'nextweek': today + timedelta(days=7) - timedelta(days=today.weekday())
|
||||
}
|
||||
|
||||
period = update.message.text.partition(' ')[2]
|
||||
|
|
Loading…
Reference in a new issue