I want to get all months name from year in moment.js
if the year is 2011, then i want to all months name in momentjs
i have tried this below
It's 2019 and you shouldn't be using moment.js anymore, since the vanilla Date() class has everything we need. Except for this little bit of functionality.
Here's what I use: There's the months NPM module which has all months in different languages. It's about 991 bytes gzipped.
Example with proper import syntax:
import months from 'months'
console.log(months.de)
Result:
[
"Januar",
"Februar",
"März",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Dezember"
]