瀏覽代碼

Add y as a time suffix for !remind.

tags/v0.2
Ben Kurtovic 9 年之前
父節點
當前提交
02b86de8a9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      earwigbot/commands/remind.py

+ 3
- 1
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."""


Loading…
取消
儲存