How to use getUTCMinutes in JavaScript
In this article, I will explain use of getUTCMinutes() method in JavaScript date object.
JavaScript date getUTCMinutes() method
-
getUTCMinutes() method of date object get the minutes from a given specified date according UTC.
-
In getUTCMinutes() method, The returned value is an integer number between 0 and 59.
- Universal Coordinated Time (UTC) is is the same as GMT time and this time set by the World Time Standard.
Syntax
Example
In the following example show to getUTCMinutes() method returns minutes of current time according to UTC.
<!DOCTYPE html>
<html>
<body>
<h3 style="color:ActiveCaption">JavaScript getUTCMinutes() Method Example</h3>
<p id="demo">Click for display the minutes, according to UTC.</p>
<button onclick="myFunction()">Click ON</button>
<script type="text/javascript">
function myFunction() {
var d = new Date();
var x = document.getElementById("demo");
x.innerHTML = document.write("According to UTC, Current minutes is: " + d.getUTCMinutes());
}
</script>
</body>
</html>
|
Output1

Output2

You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here