From cfaa91da795966aa48fc815e4afeb097844dfdb7 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Thu, 26 Mar 2020 22:32:44 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu3/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3/program.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/du3/program.c b/du3/program.c index 948c54d..9531bc0 100644 --- a/du3/program.c +++ b/du3/program.c @@ -7,10 +7,10 @@ int ValidateTime(int dd , int mm , int yy) { - //check month + if(mm>=1 && mm<=12) { - //check days + if((dd>=1 && dd<=31) && (mm==1 || mm==3 || mm==5 || mm==7 || mm==8 || mm==10 || mm==12)) return 1; else if((dd>=1 && dd<=30) && (mm==4 || mm==6 || mm==9 || mm==11)) @@ -73,25 +73,4 @@ int main() } return 0; - /*if (time == (time_t)-1) { - printf("fails with error: can't convert date to time!\n"); - return 1; - }*/ - - //t2 = localtime(&sec); - - /*time(&timer); - double seconds = difftime(timer,mktime(&t)); - printf("%.f", seconds); - return 0; - if(t.tm_mon + 1 < 10){ - printf(" %d.0%d.%d\n\n", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900); - } else{ - printf(" %d.%d.%d\n\n", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900); - } - - - exit(EXIT_SUCCESS); - - return 0;*/ }