From 7b39527686655fd153d6dec8f9fc7b4e46d7ea7e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 6 May 2010 22:32:16 +0200 Subject: mensa: Show tomorrow's meal after 3 pm --- modules/mensa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') 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>') -- cgit v1.2.3