Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function isLeapYear (yr as integer) as boolean
- isLeapYear = false
- if (mod(yr,400)) = 0 then isLeapYear = true
- elseif (mod(yr,100)) = 0 then isLeapYear = false
- elseif (mod(yr,4)) = 0 then isLeapYear = true
- end function
- Public Function isLeapYear(Yr As Integer) As Boolean
- ' returns FALSE if not Leap Year, TRUE if Leap Year
- isLeapYear = (Month(DateSerial(Yr, 2, 29)) = 2)
- End Function
- public function isLeapYear (yr as integer) as boolean
- if (mod(yr,4)) <> 0 then isLeapYear = false
- elseif (mod(yr,400)) = 0 then isLeapYear = true
- elseif (mod(yr,100)) = 0 then isLeapYear = false
- else isLeapYear = true
- end function
- Public Function isLeapYear(Yr As Integer) As Boolean
- ' returns FALSE if not Leap Year, TRUE if Leap Year
- isLeapYear = (DAY(DateSerial(Yr, 3, 0)) = 29)
- End Function
- Public Function IsLeapYear(Year As Varient) As Boolean
- IsLeapYear = IsDate("29-Feb-" & Year)
- End Function
Add Comment
Please, Sign In to add comment