JavaScript Date valueOf() Method
- Previous Page UTC()
- Next Page constructor
- Go Up One Level JavaScript Date Reference Manual
Definition and Usage
valueOf()
The method returns the original value of the Date object.
Note:The original value is returned in milliseconds since midnight of January 1, 1970 UTC.
Example
Returns the original value of the Date object:
var d = new Date(); var n = d.valueOf();
Syntax
Date.valueOf()
Parameter
No parameters.
Technical Details
Return Value: | A number representing the milliseconds between the date object and midnight of January 1, 1970 UTC. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser Support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
valueOf() | Support | Support | Support | Support | Support |
- Previous Page UTC()
- Next Page constructor
- Go Up One Level JavaScript Date Reference Manual