English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
setUTCMinutes() Sets the minutes (0 ~ 59)。
This method can also be used to set seconds and milliseconds.
If the specified parameter is out of the expected range (from 0 to59),则setUTCMinutes()try to update the date information in the Date object accordingly.
For example, if you will100 is used assecondsvalue, then the minutes will increase1(Minute value+ 1),而40 will be used for seconds.
World Standard Time (UTC) is the standard time set for world time.
date.setUTCMinutes(minutes, seconds, millisec)
var d = new Date(); d.setUTCMinutes(32);Test and see‹/›
If not specifiedsecondsandmillisecIf the parameter is not specified, use the values returned by getUTCSeconds() and getUTCMilliseconds() methods.
All browsers fully support the setUTCMinutes() method:
Method | |||||
setUTCMinutes() | Is | Is | Is | Is | Is |
Parameter | Description |
---|---|
minutes | (Required) from 0 to59integer representing minutes |
seconds | (Optional) from 0 to59integer representing seconds |
millisec | (Optional) from 0 to999number between |
Return Value: | 1970 Year1Month1Milliseconds between 00:00:00 UTC and the update date |
---|---|
JavaScript Version: | ECMAScript 1 |