The getMonth() method returns the month (from 0 to 11) for the specified date, according to local time. January is 0, February is 1, etc.
This method has the form:
The following example shows the basic use of this method.
<script> var d = new Date(); document.write(d.getMonth()); </script>
This produces the following result: