Add leading zeros and add one to month
Forgot about the fucking padding and month not being correct because fuck javascript. Hopefully I didn't forget about anything else.
This commit is contained in:
parent
49e6eaed11
commit
8b92667315
2 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
module.exports = function(user){
|
||||
let date = user.createdAt;
|
||||
return date.getUTCFullYear().toString()+"-"+date.getUTCMonth()+"-"+date.getUTCDate()+" "+date.getUTCHours()+":"+date.getUTCMinutes()+":"+date.getUTCSeconds();
|
||||
return date.getUTCFullYear() + '-' + ('0' + (date.getUTCMonth()+1)).slice(-2) + '-' + ('0' + date.getUTCDate()).slice(-2)+" "+date.getUTCHours()+":"+date.getUTCMinutes()+":"+date.getUTCSeconds();
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = function(user, guild){
|
||||
const member = guild.member(user)
|
||||
let date = member.joinedAt;
|
||||
return date.getUTCFullYear().toString()+"-"+date.getUTCMonth()+"-"+date.getUTCDate()+" "+date.getUTCHours()+":"+date.getUTCMinutes()+":"+date.getUTCSeconds();
|
||||
return date.getUTCFullYear() + '-' + ('0' + (date.getUTCMonth()+1)).slice(-2) + '-' + ('0' + date.getUTCDate()).slice(-2)+" "+date.getUTCHours()+":"+date.getUTCMinutes()+":"+date.getUTCSeconds();
|
||||
}
|
Loading…
Add table
Reference in a new issue