计算指定的年月日是这一年的第几天 def is_leap_year(year): """ 判断指定的年份是不是闰年 :param year:年份 :return:闰年返回True 平年返回False """ return year % 4 == 0 and year % 100 != 0 or year % 400 == 0 def which_day(year, month, date)