The 'DateIsValid()' method always fails the 29 Feb even when the year is a leap year. eg 20 Feb 2000. The problem is with the logic at the end of the function. In particular the following code fragment:
/* check for February with leap year */
if( month == 2 && IsLeapYear( Date8 ) && day > 29 ) {
return 0;
} else if( month==2 && day>28 ) {
return 0;
}
The 'replacement' for the above that I use is show below. It appears to work well.
if (month == 2) {
if (IsLeapYear(Date8)) {
if (day > 29)
return 0;
} else {
if (day > 28)
return 0;
}
}
This was already fixed in CVS.