From 0c00790b53cefe9103c96eaca921ebd68c668f79 Mon Sep 17 00:00:00 2001 From: Hiroto Takahashi Date: Wed, 7 May 2014 13:03:33 +0900 Subject: update alert.js change hour format --- alert.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alert.js') diff --git a/alert.js b/alert.js index 6aeabf8..b2e2085 100644 --- a/alert.js +++ b/alert.js @@ -350,8 +350,9 @@ let PLUGIN_INFO = xml` } function torelativetime(h, m) { - if (h < 0 || h > 24 || m < 0 || m > 59) + if (m > 59) return false; + h %= 24; var now = new Date(); var d = (h * 60 + parseInt(m)) - (now.getHours() * 60 + now.getMinutes() + now.getSeconds() / 60); return d >= 0 ? d : d + 60 * 24; -- cgit v1.2.3