<html>
<body>
<h2>JavaScript getMonth()</h2>
<p>The getMonth() method returns the month as a number:</p>
<p>You can use an array to display the name of the month:</p>
<p id="demo"></p>
<script>
var d = new Date();
var months = ["January","February","March","April","May","June","July","August","September","October","November","December"];
document.getElementById("demo").innerHTML = months[d.getMonth()];
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_date_month by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:39:31 GMT -->
</html>