Skip to content

Instantly share code, notes, and snippets.

@qwertypants
Created November 16, 2010 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qwertypants/701910 to your computer and use it in GitHub Desktop.
Save qwertypants/701910 to your computer and use it in GitHub Desktop.
Abbreviate a month name based on index param
var monthAbbreviation = function(month_index){
m_names = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
s = m_names[month_index - 1];
return s.substr(0,3).toUpperCase());
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment