Is it a Leap Year?

Do you want to know if a date falls in a leap year:

<%
Dim iYear

iYear = Year(Date)

if (iYear mod 4 = 0) AND ((iYear mod 100 <> 0) OR (iYear mod 400 = 0)) then
    ' It is a Leap Year
end if
%>

The Result

2024 is a Leap Year

asp leap year is it a leap year


Back To Top
© 1998 - 2024 psacake.com
Version 7.21 | Advertise on this site