timestamp
how can I get the current time and add a certain number of milliseconds to it to get a timestamp?
7 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!:function: time
@0.4.0
Formats a date into a short date-time string.
:mdn: Date.now()
The Date.now() static method returns the number of milliseconds elapsed since the epoch, which is defined as the midnight at the beginning of January 1, 1970, UTC.
:mdn: Date() constructor
The Date() constructor creates Date objects. When called as a function, it returns a string representing the current time.
?
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
how
example pls
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
They kinda have to use that,
Date.now()
returns timestamp in ms, time
function expect it in seconds, so division by 1000
would require it ig, just better yet, pass time(new Date())
and djs will do the conversion for you