CodesJava

Easy learning with example program codes

JavaScript setMinutes() method

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>

Output:

0
24
Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status