月份天数:
class Solution:
"""
@param year: a number year
@param month: a number month
@return: return the number of days of the month.
"""
def get_the_month_days(self, year, month):
# write your code here
if month in [1,3,5,7,8,10,12]:
return 31
elif month in [4,6,9,11]:
return 30
else:
if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
return 29
else:
return 28