Last Updated: February 25, 2016
· geetotes

Get full name of a month from a Javascript date object

Extend the Date object with this handy method:

Date.prototype.getMonthName = function() {
  var months = ["January", "Feburary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
  return months[this.getMonth()];

Now you can use dFoo.getMonthName() to return more than just a zero-based # of the month on your dates!!

<feel free to add dating puns to the comments/>