So I'm trying to validate dates and I have this else if "bool" that always returns false. I've written this at least 10 times and can't get it to work. When I comment everything out and only try one if at a time they all work. I know it's semantics, but I can't figure it out.
if ((month >= 1 && month <= 12) || (day >=1 && day<= 31) || (year >= 1753 ))
return false;
else if((month == 12) && (day == 31) && (year == 9999))
return false;
else if ((!isLeapyear(year)) && (day > 28))
return false;
else if (month > 12)
return false;
else
return true;