Aktualizovat „du3/program.c“
This commit is contained in:
parent
aacaf91247
commit
49b6f69dfa
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user