Created
May 27, 2016 16:42
-
-
Save vasanthv/836650cff1635ae1cefc1bed5bcc9d25 to your computer and use it in GitHub Desktop.
Get month name from date object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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