get month date code example
Example 1: javascript getmonth
new Date().getMonth(); //note that Jan=0, Dec=11 (annoying I know)
Example 2: get current month of year in number javascript
var today = new Date();
var month = today.getMonth(); // Returns 9
console.log(month); // Output: 9