日期:2009-11-26 浏览次数:20846 次
算法如下:
function isLeapYear(pYear)
set oreg=new RegExp
oreg.Pattern="^\d{4}$"
if not oreg.Test(pYear) then
isLeapYear=false
exit function
end if
oYear=clng(pYear)
if ((oYear mod 4=0 and oYear mod 100<>0) or oYear mod 400=0) then
isLeapYear=true
else
isLeapYear=false
end if
end function