Sets the date and time value in the Date object.
SyntaxdateObj.setTime( milliseconds )
The following example illustrates the use of the setTime method.
function SetTimeTest(newtime){
var d, s;
d = new Date();
s = "Current setting is ";
s += d.toUTCString();
return(s);
}
Remarks
If milliseconds is negative, it indicates a date before 1970. The range of available dates is approximately 285,616 years from either side of 1970.
Setting the date and time with the setTime method is independent of the time zone.
See also Other articles AttributionsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4