Created
May 12, 2015 21:55
-
-
Save eyeseast/906a0bdc3839dcc193e6 to your computer and use it in GitHub Desktop.
Format a date in AP style
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
function apDate(date) { | |
var months = ['Jan.', 'Feb.', 'March', 'April', 'May', 'June', 'July', 'Aug.', 'Sept.', 'Oct.', 'Nov.', 'Dec.']; | |
return months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment