From 1bde44b4381597c41f26515ce37a57ac110ae104 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 3 Jul 2015 16:28:15 -0400 Subject: [PATCH] Fix !registration on birthdays. --- earwigbot/commands/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earwigbot/commands/registration.py b/earwigbot/commands/registration.py index 9c6b2f0..6ba8fc0 100644 --- a/earwigbot/commands/registration.py +++ b/earwigbot/commands/registration.py @@ -69,7 +69,7 @@ class Registration(Command): msg.append("{0} {1}".format(num, unit if num == 1 else unit + "s")) now = datetime.utcnow() - bd_passed = (now.month, now.day) < (birth.month, birth.day) + bd_passed = now.timetuple()[1:-3] < birth.timetuple()[1:-3] years = now.year - birth.year - bd_passed delta = now - birth.replace(year=birth.year + years) insert("year", years)