CodeItBetter Programming Another VB Programming Blog

How to find a given year is leap year or not

Posted on August 21, 2011
1
2
3
4
5
'Coding Basics - How to find a given year is leap year or not
Function IsLeapYear(year As Integer) As Boolean
    ' Are February 29 and March 1 different dates?
    IsLeapYear = DateSerial(year, 2, 29) <> DateSerial(year, 3, 1)
End Function
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.