Skip to content

Instantly share code, notes, and snippets.

@eyeseast
Created May 12, 2015 21:55
Show Gist options
  • Select an option

  • Save eyeseast/906a0bdc3839dcc193e6 to your computer and use it in GitHub Desktop.

Select an option

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