js get monthfrom date code example
Example 1: get current date javascript full month
var Xmas95 = new Date();
var options = { month: 'long'};
console.log(new Intl.DateTimeFormat('en-US', options).format(Xmas95));
// December
console.log(new Intl.DateTimeFormat('de-DE', options).format(Xmas95));
// Dezember
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