From e767e43771c4f1d241459099d95c0bf8ccbc4f7b Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 11 Apr 2016 21:51:45 +0000 Subject: [PATCH] years --- modules/kick/kick.js | 2 +- modules/remind/remind.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/kick/kick.js b/modules/kick/kick.js index aec586f..59a9f5a 100644 --- a/modules/kick/kick.js +++ b/modules/kick/kick.js @@ -51,7 +51,7 @@ var kick = function(dbot) { if(!msTimeout) { return callback('Invalid time. Remember you must give e.g. 5m now.'); } - duration = duration.replace(/([\d]+)d/, '$1 days').replace(/([\d]+)h/, '$1 hours ').replace(/([\d]+)m/, '$1 minutes ').replace(/([\d]+)s/, '$1 seconds').trim(); + duration = duration.replace(/([\d]+)d/, '$1 years').replace(/([\d]+)d/, '$1 days').replace(/([\d]+)h/, '$1 hours ').replace(/([\d]+)m/, '$1 minutes ').replace(/([\d]+)s/, '$1 seconds').trim(); } else { duration += ' minutes'; } diff --git a/modules/remind/remind.js b/modules/remind/remind.js index 34dc749..a2ca5b9 100644 --- a/modules/remind/remind.js +++ b/modules/remind/remind.js @@ -13,7 +13,7 @@ var remind = function(dbot) { this.api = { 'parseTime': function(time) { var now = Date.now(); - var datesplits = time.match(/[0-9]+[dhms]/g); + var datesplits = time.match(/[0-9]+[dhmsy]/g); if(datesplits == null) { return; }