mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 06:04:57 +05:00
make old dates backwards compatible
This commit is contained in:
parent
d34c5cee09
commit
f7057160a0
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ module.exports.init = async client => {
|
||||||
// Check if the user is in the guild
|
// Check if the user is in the guild
|
||||||
if (!guild.members.cache.has(user.id)) continue;
|
if (!guild.members.cache.has(user.id)) continue;
|
||||||
|
|
||||||
const userDate = new Date(user.birthdate * 1000);
|
const userDate = user.birthdate > 9999999999 ? new Date(user.birthdate * 1000) : new Date(user.birthdate);
|
||||||
const day = userDate.getDate();
|
const day = userDate.getDate();
|
||||||
const month = userDate.getMonth() + 1;
|
const month = userDate.getMonth() + 1;
|
||||||
const year = userDate.getFullYear();
|
const year = userDate.getFullYear();
|
||||||
|
|
Loading…
Reference in a new issue