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