CodesJava

Easy learning with example program codes

JavaScript JS Date getUTCMonth() method


The JavaScript date getUTCMonth() method is used to get the integer value between 0 and 11 that represents the month on the basis of universal time.

Syntax:

dateObj.getUTCMonth()

Example:

<!DOCTYPE html>
<html>
<body>
<script>   	 
var today = new Date(); 	 
document.writeln(today.getUTCMonth()+1);   
</script>  
</body>
</html>

Output:

11
Please follow and like us:


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki