This commit is contained in:
Igor Dzuro 2020-03-27 05:20:10 +01:00
parent 92cd2cd6e7
commit 14aafa21ec

View File

@ -63,14 +63,14 @@ int main() {
char *retval = fgets(buffer, sizeof(buffer), stdin); char *retval = fgets(buffer, sizeof(buffer), stdin);
if (retval == 0) { if (retval == 0) {
puts("Neplatny datum"); puts("Nespravny datum");
return 0; return 0;
} }
retval = strptime(buffer, "%e.%m.%-Y", &tm); retval = strptime(buffer, "%e.%m.%-Y", &tm);
if (retval == 0 || datevalid(tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900) == 0) { if (retval == 0 || datevalid(tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900) == 0) {
puts("Neplatny datum"); puts("Nespravny datum");
return 0; return 0;
} }
@ -78,7 +78,7 @@ int main() {
tm.tm_mday += 7; tm.tm_mday += 7;
if (mktime(&tm) == -1) { if (mktime(&tm) == -1) {
puts("Neplatny datum"); puts("Nespravny datum");
return 0; return 0;
} }