getUTCMinutes()
Returns the UTC date's minutes as
a number between 0 and 59.
UTC time is the same as GMT time.
getUTCMinutes() |
Yes | Yes | Yes | Yes | Yes |
dateObject.getUTCMinutes();
None.
return a number, from 0-59, representing the minutes.
var myDate = new Date();
console.log(myDate.getUTCMinutes());
The code above generates the following result.
The following code returns the UTC minutes from a specific date and time.
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {<!-- ww w .j a va 2 s. c o m-->
var d = new Date("July 12, 1976 01:23:00");
var n = d.getUTCMinutes();
document.getElementById("demo").innerHTML = n;
}
</script>
</body>
</html>
The code above is rendered as follows: