wtf
This commit is contained in:
parent
92cd2cd6e7
commit
14aafa21ec
@ -63,14 +63,14 @@ int main() {
|
||||
char *retval = fgets(buffer, sizeof(buffer), stdin);
|
||||
|
||||
if (retval == 0) {
|
||||
puts("Neplatny datum");
|
||||
puts("Nespravny datum");
|
||||
return 0;
|
||||
}
|
||||
|
||||
retval = strptime(buffer, "%e.%m.%-Y", &tm);
|
||||
|
||||
if (retval == 0 || datevalid(tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900) == 0) {
|
||||
puts("Neplatny datum");
|
||||
puts("Nespravny datum");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ int main() {
|
||||
tm.tm_mday += 7;
|
||||
|
||||
if (mktime(&tm) == -1) {
|
||||
puts("Neplatny datum");
|
||||
puts("Nespravny datum");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user