JavaScript setMinutes()

The JavaScript date setMinutes() method sets the minute value for the particular date on the basis of local time.

Syntax:

dateObj.setMinutes(new_Minutes);

Parameters: new_Minutes: Integer value between 0 to 59.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
var bday =new Date("November 16, 1994 21:00:10");
document.writeln(bday.getMinutes() + "<br>");
bday.setMinutes(24);
document.writeln(bday.getMinutes());
</script>
</body>
</html>
Please follow and like us:
Content Protection by DMCA.com