if (month in (1,3,5,7,8,10,12))
return 31;
else if (month in(4,6,9,11))
return 30;
else if (year 是闰年)
return 29;
else
return 28;
闰年的算法
((year mod 4 = 0) and (year mod 100 <> 0)) or (year mod 400 = 0)
if (month in (1,3,5,7,8,10,12))
return 31;
else if (month in(4,6,9,11))
return 30;
else if (year 是闰年)
return 29;
else
return 28;
闰年的算法
((year mod 4 = 0) and (year mod 100 <> 0)) or (year mod 400 = 0)