From ac1ecdfc448e84b5c95d85c443e90339ea7036ad Mon Sep 17 00:00:00 2001 From: iou1name Date: Fri, 27 Mar 2020 13:14:24 -0400 Subject: [PATCH] bugfix support for years in .remind --- modules/remind.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/remind.py b/modules/remind.py index 9b84d8f..df8c1a8 100755 --- a/modules/remind.py +++ b/modules/remind.py @@ -60,6 +60,9 @@ def remind(bot, trigger): if not reg: return bot.reply("I didn't understand that.") args = {shorthand[g[-1]]: int(g[:-1]) for g in reg.groups() if g} + if args.get('years'): + args['days'] = args['years']*365 + args.get('days', 0) # screw leap years + del args['years'] delta = timedelta(**args) dt = datetime.now() + delta reminder = ' '.join(trigger.args[2:])