From 7f47a753dbe6b1f029c92c037dbd89822ab12c94 Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Sun, 27 Sep 2009 21:21:26 +0100 Subject: [PATCH] cosmetic change to comment --- pyfpdb/Database.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 9fafe68a..2a9e0521 100755 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -372,7 +372,10 @@ class Database: return winners def init_hud_stat_vars(self, hud_days): - """Initialise variables used by Hud to fetch stats.""" + """Initialise variables used by Hud to fetch stats: + self.hand_1day_ago handId of latest hand played more than a day ago + self.date_ndays_ago date n days ago + """ self.hand_1day_ago = 1 try: @@ -385,9 +388,10 @@ class Database: else: if row and row[0]: self.hand_1_day_ago = row[0] - d = timedelta(days=hud_days) - now = datetime.utcnow() - d - self.date_ndays_ago = "d%02d%02d%02d" % (now.year - 2000, now.month, now.day) + + d = timedelta(days=hud_days) + now = datetime.utcnow() - d + self.date_ndays_ago = "d%02d%02d%02d" % (now.year - 2000, now.month, now.day) def init_player_hud_stat_vars(self, playerid): # not sure if this is workable, to be continued ...