diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2010-05-06 22:32:16 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2010-05-06 22:32:16 +0200 |
commit | 7b39527686655fd153d6dec8f9fc7b4e46d7ea7e (patch) | |
tree | 3701a1f1c0f17f25db8337fde9a979769b857b8c /modules | |
parent | 660528b4faef87485c9268a986289fa20da40c8d (diff) | |
download | curunir-7b39527686655fd153d6dec8f9fc7b4e46d7ea7e.tar curunir-7b39527686655fd153d6dec8f9fc7b4e46d7ea7e.zip |
mensa: Show tomorrow's meal after 3 pm
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mensa.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mensa.py b/modules/mensa.py index 32c9ee9..daee81d 100644 --- a/modules/mensa.py +++ b/modules/mensa.py @@ -2,7 +2,7 @@ from base import ModuleBase import re -from datetime import date, timedelta +from datetime import datetime, date, timedelta, time import urllib class Module(ModuleBase): @@ -19,7 +19,7 @@ class Module(ModuleBase): tomorrow = re.match(r'!mensa\W+tomorrow(\W|\Z)', text) daystr = 'Heute' day = date.today() - if tomorrow: + if tomorrow or datetime.now().time() > time(15): day += timedelta(1) daystr = 'Morgen' datestr = day.strftime(r'%d\.%m\.<\/div>') |