Skip to content

Instantly share code, notes, and snippets.

@eyeseast
Created May 12, 2015 21:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eyeseast/906a0bdc3839dcc193e6 to your computer and use it in GitHub Desktop.
Save eyeseast/906a0bdc3839dcc193e6 to your computer and use it in GitHub Desktop.
Format a date in AP style
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