How do I check to see if a year is a leap year in VBScript?
Hi <BR>------------<BR>1)Years divisible by four are leap years, unless...<BR>2)Years also divisible by 100 are not leap years, except...<BR>3)Years divisible by 400 are leap years. <BR><BR>Declare variables and apply the above rules. It works<BR>
calculating the remainder is a simply way to check it<BR><BR>in VBScript: year MOD 4 ... check leap year
I use the IsDate function to check for a leap year.<BR><BR>If IsDate("2/29/" & iYear) then<BR>' it is a leap year<BR>Else<BR>' it is not a leap year<BR>End If