Skip to content

Instantly share code, notes, and snippets.

@ademilter
Created January 13, 2018 19:08
Show Gist options
  • Save ademilter/a05231f389f7c501233f9420de627103 to your computer and use it in GitHub Desktop.
Save ademilter/a05231f389f7c501233f9420de627103 to your computer and use it in GitHub Desktop.
let m = moment()
for (let dayOfMonth = 0; dayOfMonth < 12; dayOfMonth++) {
let getMonth = m.month(dayOfMonth)
let monthName = getMonth.format('MMMM')
let daysInMonth = getMonth.daysInMonth()
_.set(this.calender, monthName, daysInMonth)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment