Function getAmountMonthDays(iMonth, iYear)
result = 0
select case iMonth
case "1" ,"3", "5", "7", "8", "10", "12"
result = 31
case "4", "6", "9", "11"
result = 30
case "2"
if ((iYear mod 4) = 0 and (iYear mod 100) <> 0) or (iYear mod 400) = 0 then
result = 29
else
result = 28
end if
end select
getAmountMonthDays = result
End Function
result = 0
select case iMonth
case "1" ,"3", "5", "7", "8", "10", "12"
result = 31
case "4", "6", "9", "11"
result = 30
case "2"
if ((iYear mod 4) = 0 and (iYear mod 100) <> 0) or (iYear mod 400) = 0 then
result = 29
else
result = 28
end if
end select
getAmountMonthDays = result
End Function
'知 > ASP' 카테고리의 다른 글
접속하는 PC의 IP 보여주기 (0) | 2008.07.09 |
---|