Skip to content

Instantly share code, notes, and snippets.

@vasanthv
Created May 27, 2016 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vasanthv/836650cff1635ae1cefc1bed5bcc9d25 to your computer and use it in GitHub Desktop.
Save vasanthv/836650cff1635ae1cefc1bed5bcc9d25 to your computer and use it in GitHub Desktop.
Get month name from date object
var date = new Date();
var months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
console.log("The current month is " + months[date.getMonth()]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment