discord_bot/util/getJoinDate.js
SileNce5k 8b92667315
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.
2021-06-27 20:14:46 +02:00

5 lines
No EOL
302 B
JavaScript

module.exports = function(user, guild){
const member = guild.member(user)
let date = member.joinedAt;
return date.getUTCFullYear() + '-' + ('0' + (date.getUTCMonth()+1)).slice(-2) + '-' + ('0' + date.getUTCDate()).slice(-2)+" "+date.getUTCHours()+":"+date.getUTCMinutes()+":"+date.getUTCSeconds();
}