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
Written by Béla Varga
Related protips
1 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
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#