If current year is a leap year and the date given is after the 28 th of February then it must include the 29 th February
if ( month > 2 && year % 4 == 0 && ( year % 100 != 0 year % 400 == 0 ) ) { ++ day ; }