#Day Counter from a specific day.

9 messages · Page 1 of 1 (latest)

raw island
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

night lava
#

<t:420:R>

#

u mean something like that

frosty wadiBOT
night lava
#

^ unix timestamp

marsh sapphire
#

I figured it out:

#

var date1 = new Date(2022, 8, 1);
var date2 = new Date();

var Difference_In_Time = date2.getTime() - date1.getTime();

var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24);

(counter = ("It Has Been "

  • Difference_In_Days.toFixed(1)))

    if (command === 'days') {
    message.channel.send(${counter} Days!)
    };

night lava
#

mhh u can also do it like that

#

also Date.now() exists