This commit is contained in:
reality 2016-04-11 21:51:45 +00:00
parent 2ebeea1ef4
commit e767e43771
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ var kick = function(dbot) {
if(!msTimeout) { if(!msTimeout) {
return callback('Invalid time. Remember you must give e.g. 5m now.'); 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 { } else {
duration += ' minutes'; duration += ' minutes';
} }

View File

@ -13,7 +13,7 @@ var remind = function(dbot) {
this.api = { this.api = {
'parseTime': function(time) { 'parseTime': function(time) {
var now = Date.now(); var now = Date.now();
var datesplits = time.match(/[0-9]+[dhms]/g); var datesplits = time.match(/[0-9]+[dhmsy]/g);
if(datesplits == null) { if(datesplits == null) {
return; return;
} }