Skip to content

Instantly share code, notes, and snippets.

@juanmacuevas
Created March 30, 2015 13:22
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 juanmacuevas/1ed45c43af909af42904 to your computer and use it in GitHub Desktop.
Save juanmacuevas/1ed45c43af909af42904 to your computer and use it in GitHub Desktop.
def daysInMonth(year,month):
days = 31
if month%7%2 > 0:
days = 30
if month == 1:
days = days - 2 + (year %4 == 0)
return days
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment