diff options
author | Hiroto Takahashi | 2014-05-07 13:03:33 +0900 |
---|---|---|
committer | Hiroto Takahashi | 2014-05-07 13:03:33 +0900 |
commit | 0c00790b53cefe9103c96eaca921ebd68c668f79 (patch) | |
tree | f774a2abedeedbf2106aac5ffe4bf4329f1b417f | |
parent | eb20651ddfea323e9138a80b9cdf536022791bdf (diff) | |
download | vimperator-plugins-0c00790b53cefe9103c96eaca921ebd68c668f79.tar.bz2 |
update alert.js change hour format
-rw-r--r-- | alert.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |