From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Date Object
The getTime() method returns the number of milliseconds since midnight of January 1, 1970.
| dateObject.getTime() |
Note: This method is always used in conjunction with a Date object.
Example 1Get how many milliseconds since 1970/01/01:
Try it yourself » |
Example 2Calculate the number of years since 1970/01/01:
Try it yourself » |
JavaScript Date Object
From http://www.w3schools.com (Copyright Refsnes Data)