removed joindates because idk how to do it properly
This commit is contained in:
parent
d67141dff1
commit
228f3468e7
1 changed files with 31 additions and 47 deletions
|
@ -1,55 +1,39 @@
|
||||||
module.exports = function (client) {
|
module.exports = function (user) {
|
||||||
let creationDate = client.user.createdAt
|
let creationMonth;
|
||||||
let hour = creationDate.getHours().toString();
|
let creationDate;
|
||||||
if (hour.length == 1) {
|
let creationHours;
|
||||||
hour = "0" + hour;
|
let creationMinutes;
|
||||||
}
|
let creationSeconds;
|
||||||
let minutes = creationDate.getMinutes().toString();
|
console.log(user.joinedAt)
|
||||||
if (minutes.length == 1) {
|
|
||||||
minutes = "0" + minutes;
|
|
||||||
}
|
|
||||||
let seconds = creationDate.getSeconds().toString();
|
|
||||||
if (seconds.length == 1) {
|
|
||||||
let seconds = "0" + seconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
let month = (creationDate.getMonth() + 1).toString();
|
if (user.createdAt.getUTCMonth().toString().length === 1)
|
||||||
if (month.length == 1) {
|
creationMonth = "0" + user.createdAt.getUTCMonth()
|
||||||
month = "0" + month;
|
else
|
||||||
}
|
creationMonth = user.createdAt.getUTCMonth()
|
||||||
|
|
||||||
let date = creationDate.getDate().toString();
|
if (user.createdAt.getUTCDate().toString().length === 1)
|
||||||
if (date.length == 1) {
|
creationDate = "0" + user.createdAt.getUTCDate()
|
||||||
date = "0" + date;
|
else
|
||||||
}
|
creationDate = user.createdAt.getUTCDate()
|
||||||
creationDate = creationDate.getFullYear() + "-" + month + "-" + date + " " + hour + ":" + minutes + ":" + seconds;
|
|
||||||
|
if (user.createdAt.getUTCHours().toString().length === 1)
|
||||||
|
creationHours = "0" + user.createdAt.getUTCHours()
|
||||||
|
else
|
||||||
|
creationHours = user.createdAt.getUTCHours()
|
||||||
|
|
||||||
|
|
||||||
let datejoin = user.joinedAt;
|
if (user.createdAt.getUTCMinutes().toString().length === 1)
|
||||||
month = (datejoin.getMonth() + 1).toString();
|
creationMinutes = "0" + user.createdAt.getUTCMinutes()
|
||||||
if (month.length == 1) {
|
else
|
||||||
month = "0" + month;
|
creationMinutes = user.createdAt.getUTCMinutes()
|
||||||
}
|
|
||||||
|
|
||||||
date = datejoin.getDate().toString();
|
|
||||||
if (date.length == 1) {
|
|
||||||
date = "0" + date;
|
|
||||||
}
|
|
||||||
|
|
||||||
hour = datejoin.getHours().toString();
|
if (user.createdAt.getUTCSeconds().toString().length === 1)
|
||||||
if (hour.length == 1) {
|
creationSeconds = "0" + user.createdAt.getUTCSeconds()
|
||||||
hour = "0" + hour;
|
else
|
||||||
}
|
creationSeconds = user.createdAt.getUTCSeconds()
|
||||||
minutes = datejoin.getMinutes().toString();
|
|
||||||
if (minutes.length == 1) {
|
|
||||||
minutes = "0" + minutes;
|
|
||||||
}
|
|
||||||
seconds = datejoin.getSeconds().toString();
|
|
||||||
if (seconds.length == 1) {
|
|
||||||
seconds = "0" + seconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
let joindate = datejoin.getFullYear() + "-" + month + "-" + date + " " + hour + ":" + minutes + ":" + seconds;
|
|
||||||
|
|
||||||
return { datecreate: creationDate, joindate: joindate };
|
let creation = `${user.createdAt.getUTCFullYear()}-${creationMonth}-${creationDate} ${creationHours}:${creationMinutes}:${creationSeconds}`
|
||||||
|
return { creation: creation }
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue