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
2011
i have tried this below
You are going to have to access the months from an array:
var months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; var monthInt = new Date().getMonth(); var monthString = months[monthInt];