JavaScript Date setUTCMinutes() Method
- Previous Page setUTCMilliseconds()
- Next Page setUTCMonth()
- Go to the Previous Level JavaScript Date Reference Manual
Definition and Usage
setUTCMinutes()
The method sets the minutes of the date object based on UTC time.
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).
Instance
Example 1
Set the minutes according to UTC time to 17:
var d = new Date(); d.setUTCMinutes(17);
Example 2
Use UTC methods to set the date and time 90 minutes ago:
var d = new Date(); d.setUTCMinutes(d.getUTCMinutes() - 90);
Syntax
Date.setUTCMinutes(min, sec, millisec)
Parameter Value
Parameter | Description |
---|---|
min |
Required. Represents the integer of minutes. Expected values are 0-59, but other values are allowed:
|
sec |
Optional. Represents the integer of seconds. Expected values are 0-59, but other values are allowed:
|
millisec |
Optional. Represents the integer of milliseconds. Expected values are 0-999, but other values are allowed:
|
Technical Details
Return value: | A number, representing the number of milliseconds between the Date object and midnight on January 1, 1970. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser Support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
setUTCMinutes() | Support | Support | Support | Support | Support |
Related Pages
Tutorial:JavaScript Date
Tutorial:JavaScript Date Format
Tutorial:JavaScript Date Setting Methods
- Previous Page setUTCMilliseconds()
- Next Page setUTCMonth()
- Go to the Previous Level JavaScript Date Reference Manual