mirror of
https://github.com/reality/dbot.git
synced 2024-12-28 05:32:50 +01:00
years
This commit is contained in:
parent
2ebeea1ef4
commit
e767e43771
@ -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';
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user