resolver method
This commit is contained in:
parent
25e2fc033f
commit
cfe06d92e6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user