JavaScript Date valueOf() method
- Föregående sida UTC()
- Nästa sida constructor
- Gå tillbaka till föregående nivå JavaScript Date referens manual
Definition and usage
valueOf()
The method returns the original value of the Date object.
Note:The original value is returned in the form of milliseconds since midnight UTC on January 1, 1970.
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 UTC on January 1, 1970. |
---|---|
JavaScript version: | ECMAScript 1 |
Webbläsarstöd
Metoder | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
valueOf() | Stöd | Stöd | Stöd | Stöd | Stöd |
- Föregående sida UTC()
- Nästa sida constructor
- Gå tillbaka till föregående nivå JavaScript Date referens manual