This commit is contained in:
Igor Dzuro 2020-03-27 05:17:48 +01:00
parent 3f743a0312
commit 92cd2cd6e7
2 changed files with 7 additions and 5 deletions

Binary file not shown.

View File

@ -35,13 +35,15 @@ int datevalid(int d, int m, int y) {
if (m == 2) { if (m == 2) {
if (isleap(y)) { if (isleap(y)) {
if(d <= 29) { if (d > 29) {
return 1; return 0;
} }
} else { } else {
if (d > 28) {
return 0; return 0;
} }
} }
}
if ( m == 4 || m == 6 || m == 9 || m == 11 ) { if ( m == 4 || m == 6 || m == 9 || m == 11 ) {
if(d <= 30) { if(d <= 30) {