<html>
<body>
<h2>JavaScript getMonth()</h2>
<p>The getMonth() method returns the month of a date as a number from 0 to 11.</p>
<p>To get the correct month, you must add 1:</p>
<p id="demo"></p>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = d.getMonth() + 1;
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_date_getmonth by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:39:30 GMT -->
</html>