function getDays(tdate)
yy=year(tdate)
mm=month(tdate)
select case mm
case 2
if not (((yy mod 4=0) and (yy mod 100<>0)) or (yy mod 400=0)) then
getDays=28
else
getDays=29
end if
case else
if mm < 8 then
if mm mod 2=0 then
getDays=30
else
getDays=31
end if
else
if mm mod 2=0 then
getDays=31
else
getDays=30
end if
end if
end select
end function
前些天写的 可惜是VBS的 呵呵