def daysInMonth(self, month, year):
result = None<EOL>debug and log.debug('<STR_LIT>', month, year)<EOL>if month > <NUM_LIT:0> and month <= <NUM_LIT:12>:<EOL><INDENT>result = self._DaysInMonthList[month - <NUM_LIT:1>]<EOL>if month == <NUM_LIT:2>:<EOL><INDENT>if year in self._leapYears:<EOL><INDENT>result += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>if calendar.isleap(year):<EOL><INDENT>self._leapYears.append(year)<EOL>result += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT><DEDENT>return result<EOL>
Take the given month (1-12) and a given year (4 digit) return
the number of days in the month adjusting for leap year as needed