- Instant help with your JavaScript coding problems

Get month name from Date in JavaScript

How to get month name from Date in JavaScript?
let now = new Date();

let monthName = now.toLocaleString('default', { month: 'long' });

console.log('The month is: ' + monthName);

The toLocaleString() method returns a string with a language sensitive representation of this date.

The new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function.

Share "How to get month name from Date in JavaScript?"