JavaScript getUTCMinutes function is one of the Date Functions, which returns the total minutes in a given date according to universal time. The syntax of the getUTCMinutes function is:
Date.getUTCMinutes()
JavaScript getUTCMinutes Example
We are using getUTCMinutes to return the total minutes as per the universal time from the current date and time.
<!DOCTYPE html> <html> <head> <title> JS </title> </head> <body> <h1> Example </h1> <script> var dt = Date(); document.write("Date and Time : " + dt); document.write("UTC Minutes : " + dt.getUTCMinutes()); </script> </body> </html>
Example
Date and Time: Mon Nov 05 2018 11:17:31 GMT+0530 (Indian Standard Time)
UTC Minutes : 47
getUTCMinutes Example 2
In this JavaScript get UTC Minutes example, we display the minutes from the custom date and time per universal time.
<!DOCTYPE html> <html> <head> <title> JavaScriptGetUTCMinutesFunction </title> </head> <body> <h1> JavaScriptgetUTCMinutesFunctionExample </h1> <script> var dt = Date("April 1, 2017 10:12:22"); document.write("Date and Time : " + dt); document.write("UTC Minutes using getUTCMinutes : " + dt.getUTCMinutes()); </script> </body> </html>