A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/Date/setUTCMilliseconds below:

setUTCMilliseconds ยท WebPlatform Docs

setUTCMilliseconds Summary

Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).

Syntax
dateObj.setUTCMilliseconds( numMilli )
dateObj
Required. Any Date object.
numMilli
Required. A numeric value equal to the millisecond value.
Examples

The following example illustrates the use of the setUTCMilliseconds method.

function SetUTCMSecDemo(nmsec){
 
    var d = new Date();
 
    d.setUTCMilliseconds(nmsec);

    var s = "Current setting is ";
    s += d.toUTCString();
    s += " and " + d.getUTCMilliseconds();
    s += " milliseconds"
    return(s);
 }
Remarks

To set the milliseconds using local time, use the setMilliseconds method.

If the value of numMilli is greater than 999, or is a negative number, the stored number of seconds (and minutes, hours, and so forth, if necessary) is incremented an appropriate amount.

See also Other articles Attributions

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