Return the number of milliseconds since 1970/01/01:
The result of n could be:
More "Try it Yourself" examples below.
The getTime() method returns the number of milliseconds between midnight of January 1, 1970 and the specified date.
Method | |||||
---|---|---|---|---|---|
getTime() | Yes | Yes | Yes | Yes | Yes |
None |
Return Value: | A Number, representing the number of milliseconds since midnight January 1, 1970 |
---|---|
JavaScript Version: | 1.0 |
Calculate the number of years since 1970/01/01:
The result of y will be: