Skip to content

Instantly share code, notes, and snippets.

@ierhyna
Created September 15, 2016 19:30
Show Gist options
  • Save ierhyna/bd6e73fcb050bbc8aa4b2cdb53855099 to your computer and use it in GitHub Desktop.
Save ierhyna/bd6e73fcb050bbc8aa4b2cdb53855099 to your computer and use it in GitHub Desktop.
Pretty Date
/**
* 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