>>> import calendar >>> calendar.isleap(2000) #判断是否是闰年 True >>> calendar.isleap(2100) False >>> calendar.month(2100,12) #查看2100年12的日历 ' December 2100 Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ' >>> calendar.monthrange(2011,12) #查看2011年12月是以星期几开始和当月总天数,返回元组 (3, 31) >>> calendar.monthrange(2012,2) (2, 29) >>> calendar.weekday(2010,2,23) #查看2010年2月23日是星期几 1 >>> #注意:在python中星期一为0,星期二为1...