Created
September 15, 2016 19:30
-
-
Save ierhyna/bd6e73fcb050bbc8aa4b2cdb53855099 to your computer and use it in GitHub Desktop.
Pretty Date
This file contains hidden or 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
/** | |
* Pretty Date | |
* @param dateObj | |
*/ | |
function prettyDate(dateObj) { | |
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; | |
return months[dateObj.getMonth()] + ' ' + | |
dateObj.getDate() + ', ' + | |
dateObj.getFullYear(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment