Date.setUTCMilliseconds() (Method)

Set the UTC milliseconds value of the time object.


ECMAScript edition - 2
JavaScript - 1.3
JScript - 3.0
Internet Explorer - 4.0
Netscape - 4.0
Property/method value type:Time value
JavaScript syntax:-myDate.setUTCMilliseconds(aMillisecondValue)
Argument list:aMillisecondValuea value between 0 and 999 milliseconds

The computations are done based on extracting a UTC time value and changing the millisecond count for that before storing it back, again as a UTC time value.

The result of this method is the new time value having had the milliseconds component set according to the passed-in argument.

Example code:

   myDate = new Date();
   myTime = myDate.getTime();
   document.write("The time rounded down to the nearest second is "  + myTime + " Milliseconds");

See also:Date.getMilliseconds(), Date.getUTCMilliseconds(), Date.prototype, Date.setMilliseconds()


ECMA 262 edition 2 - section -

ECMA 262 edition 3 - section -