resolver method

This commit is contained in:
Erik 2022-01-12 16:57:00 +02:00
parent 25e2fc033f
commit cfe06d92e6
No known key found for this signature in database
GPG Key ID: FEFF4B220DDF5589

View File

@ -1,3 +1,5 @@
const timestring = require('timestring');
class Resolver {
constructor(client) {
@ -18,6 +20,16 @@ class Resolver {
}
resolveTime(string) {
let time = null;
try {
time = timestring(string);
} catch (err) {
return null;
}
return time;
}
}
module.exports = Resolver;