Date.getUTCMinutes()
Returns the minutes, according to universal time (from 0-59)
The getUTCMinutes() method returns the minutes in the specified date according to universal time.
var date1 = new Date('1 January 2000 03:15:30 GMT+07:00');
var date2 = new Date('1 January 2000 03:15:30 GMT+03:30');
console.log(date1.getUTCMinutes()); // 31 Dec 1999 20:15:30 GMT
// expected output: 15
console.log(date2.getUTCMinutes()); // 31 Dec 1999 23:45:30 GMT
// expected output: 45
Syntax
dateObj.getUTCMinutes()
Return value
An integer number, between 0 and 59, representing the minutes in the given date according to universal time.
Examples
Using getUTCMinutes()
getUTCMinutes()
The following example assigns the minutes portion of the current time to the variable minutes
.
var today = new Date();
var minutes = today.getUTCMinutes();
References
Contributors to this page
Uros Durdevic
Last updated