From 02b86de8a9dfa976fb00a1ee9f99323f7f3b4f2b Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 4 Oct 2015 19:10:44 -0500 Subject: [PATCH] Add y as a time suffix for !remind. --- earwigbot/commands/remind.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/earwigbot/commands/remind.py b/earwigbot/commands/remind.py index 11aca35..8b32585 100644 --- a/earwigbot/commands/remind.py +++ b/earwigbot/commands/remind.py @@ -61,7 +61,9 @@ class Remind(Command): ast.FloorDiv: operator.floordiv, ast.Mod: operator.mod, ast.Pow: operator.pow } - time_units = {"s": 1, "m": 60, "h": 3600, "d": 86400, "w": 604800} + time_units = { + "s": 1, "m": 60, "h": 3600, "d": 86400, "w": 604800, "y": 31536000 + } def _evaluate(node): """Convert an AST node into a real number or raise an exception."""