定义简化版 nextDay
def nextDay(year,month,day):
"""Warning:this version incorrectly assumes all months have 30 days!"""
if day<30:
return year,month,day+1
else:
if month < 1:
return year,month + 1, 1
else:
return year + 1, 1, 1
网友评论