Refresh

This website www.w3schools.blog/setutcminutes-javascript-js is currently offline. Cloudflare\'s Always Online™ shows a snapshot of this web page from the Internet Archive\'s Wayback Machine. To check for the live version, click Refresh.

JavaScript setUTCMinutes()

The JavaScript date setUTCMinutes() method sets the minute value for a particular date on the basis of universal time.

Syntax:

dateObj.setUTCMinutes(new_minutes);

Parameters:
new_minutes: Integer value between 0 to 59.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
var today =new Date();
document.writeln(today.getUTCMinutes()+"<br>");
today.setUTCMinutes(45);
document.writeln(today.getUTCMinutes());
</script>
</body>
</html>