Aktualizovat „du3/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-03-26 22:23:41 +00:00
parent aacaf91247
commit 49b6f69dfa

View File

@ -45,12 +45,12 @@ int main()
sscanf(dateStr , "%d.%d.%d" , &dd,&mm,&yy); sscanf(dateStr , "%d.%d.%d" , &dd,&mm,&yy);
if(!ValidateTime(dd,mm,yy)){ if(!ValidateTime(dd,mm,yy)){
printf("Nespravny datum\n"); printf("Nespravny datum\n");
return 1; return 0;
} }
char* res = strptime(dateStr, "%d.%m.%Y", &t); char* res = strptime(dateStr, "%d.%m.%Y", &t);
if (res == NULL) { if (res == NULL) {
printf("error: can't parse date!\n"); printf("Nespravny datum\n");
return 1; return 0;
} }
t.tm_mday += 7; t.tm_mday += 7;