IsLeapDay

public static Boolean IsLeapDay(this DateTime date)
{
    return(date.Month == 2 && date.Day == 29);
}
Example:
Boolean isLeapDay = new DateTime(2012, 2, 29).IsLeapDay();

Description

Checks if the current day is a leap day

Details

Double click on the code to select all.

 

;