fix calc typo
This commit is contained in:
parent
1e97965263
commit
1bc9985dec
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
userDays: function(user) {
|
userDays: function (user) {
|
||||||
if (typeof user !== "object") throw new TypeError("Not an Object");
|
if (typeof user !== "object") throw new TypeError("Not an Object");
|
||||||
|
|
||||||
let creation = new Date().getTime() - user.createdAt.getTime();
|
let creation = new Date().getTime() - user.createdAt.getTime();
|
||||||
|
@ -8,8 +8,8 @@ module.exports = {
|
||||||
|
|
||||||
return Math.round(days);
|
return Math.round(days);
|
||||||
},
|
},
|
||||||
serverDays: function(server) {
|
serverDays: function (server) {
|
||||||
if (typeof user !== "object") throw new TypeError("Not an Object");
|
if (typeof server !== "object") throw new TypeError("Not an Object");
|
||||||
|
|
||||||
let creation = new Date().getTime() - server.createdAt.getTime();
|
let creation = new Date().getTime() - server.createdAt.getTime();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue