Skip to content

Instantly share code, notes, and snippets.

@padolsey
Created September 16, 2009 14:11
Show Gist options
  • Save padolsey/188060 to your computer and use it in GitHub Desktop.
Save padolsey/188060 to your computer and use it in GitHub Desktop.
var getDaysInMonth = function(m, y){
return /8|3|5|10/.test(m)?30:m==1?(!(y%4)&&y%100)||!(y%400)?29:28:31;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment