Browse Source

Add y as a time suffix for !remind.

tags/v0.2
Ben Kurtovic 9 years ago
parent
commit
02b86de8a9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      earwigbot/commands/remind.py

+ 3
- 1
earwigbot/commands/remind.py View File

@@ -61,7 +61,9 @@ class Remind(Command):
ast.FloorDiv: operator.floordiv, ast.Mod: operator.mod, ast.FloorDiv: operator.floordiv, ast.Mod: operator.mod,
ast.Pow: operator.pow 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): def _evaluate(node):
"""Convert an AST node into a real number or raise an exception.""" """Convert an AST node into a real number or raise an exception."""


Loading…
Cancel
Save