Last Updated: February 25, 2016
·
943
· netzzwerg

Date to Integer

Date as String Value:

new Date()
// Date {Fri Nov 23 2012 21:51:02 GMT+0100 (CET)}

Date as Integer Value

+new Date()
// 1353703862519

1 Response
Add your response

Thanks! Might be fair to mention that the value is in milliseconds since epoch, unlike the seconds you might be used to.

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Related Tags
#javascript
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside