JavaScript Date setUTCMilliseconds() Method
- Previous Page setUTCHours()
- Next Page setUTCMinutes()
- Go Back to the Previous Level JavaScript Date Reference Manual
Definition and Usage
setUTCMilliseconds()
The method sets milliseconds according to world time (from 0 to 999).
Tip:Coordinated Universal Time (UTC) is the time set by the world time standard.
Note:UTC time is the same as GMT time (Greenwich Mean Time).
Example
Set milliseconds to 192 according to UTC time:
var d = new Date(); d.setUTCMilliseconds(192); var n = d.getUTCMilliseconds();
Syntax
Date.setUTCMilliseconds(millisec)
Parameter Value
Parameter | Description |
---|---|
millisec |
Required. An integer representing milliseconds. The expected value is 0-999, but other values are allowed:
|
Technical Details
Return Value: | A number representing the milliseconds between the date object and midnight on January 1, 1970. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser Support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
setUTCMilliseconds() | Support | Support | Support | Support | Support |
Related Pages
Tutorial:JavaScript Date
Tutorial:JavaScript Date Format
Tutorial:JavaScript Date Setting Methods
- Previous Page setUTCHours()
- Next Page setUTCMinutes()
- Go Back to the Previous Level JavaScript Date Reference Manual