Home >>JavaScript Date Object Methods >JavaScript getUTCMinutes() Method
The getUTCMinutes() method is an inbuilt method in JavaScript which returns the minutes (from 0 to 59) in the specified date according to universal time.
Syntax:Date.getUTCMinutes()
Method | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
getUTCMinutes() | Yes | Yes | Yes | Yes | Yes |
<html> <body> <button onclick="mygetmin()">click me</button> <p id="min"></p> <script> function mygetmin() { var d = new Date(); var m = d.getUTCMinutes(); document.getElementById("min").innerHTML = m; } </script> </body> </html>
<html> <body> <script> var min1=new Date("February 25 2020 22:53:40 GMT+8:00"); document.writeln("Minute: "+min1.getUTCMinutes()+"<br>"); </script> </body> </html>