diff --git a/funcext/tvclib/utslvclauxiliary.tsf b/funcext/tvclib/utslvclauxiliary.tsf index 5445bba..e878c06 100644 --- a/funcext/tvclib/utslvclauxiliary.tsf +++ b/funcext/tvclib/utslvclauxiliary.tsf @@ -2175,9 +2175,21 @@ begin xx := array(max(xx1[0],xx2[0]),min(xx1[1],xx2[1])); return 1; end -function getmonthdates(y,m); +function leapyear(y); //闰年判断 +begin + if not(y mod 4) then + begin + if not(y mod 100) then + begin + return not(y mod 400); + end + return 1; + end + return 0; +end +function getmonthdates(y,m); //获得所在月的天数 begin - if m = 2 then return (not(y mod 4) and ( (y mod 100)))+ 28; + if m = 2 then return leapyear(y)+ 28; if m in array(1,3,5,7,8,10,12) then return 31; return 30; end