Skip to content
Browse files

Adds JS-Get-Timestamp.md

  • Loading branch information...
1 parent 2c95294 commit 99bb3800e12fe6cc6cbaf078b74abaa7a60faab4 rishipuri committed
Showing with 7 additions and 0 deletions.
  1. +7 −0 JS-Get-Timestamp.md
View
7 JS-Get-Timestamp.md
@@ -0,0 +1,7 @@
+# Get Timestamp
+
+You can use `Date.now()` to get the current timestamp in milliseconds.
+
+You can easily convert the timestamp to seconds like this: `Math.floor(Date.now() / 1000)`
+
+If your browser does not support `Date.now()`, you can use `new Date().getTime()` to get the timestamp in milliseconds.

0 comments on commit 99bb380

Please sign in to comment.
Something went wrong with that request. Please try again.