23.04.2009, 15:55
I think he's considering a temporary ban function or something.
second=second1-second2;
if(second<0){second+=60;minute1-=1;}
minute=minute1-minute2;
if(minute<0){minute+=60;hour1-=1;}
hour=hour1-hour2;
if(hour<0){hour+=24;day1-=1;}
day=day1-day2;
if(day<0){day+=30;month1-1;} //the 30 depends on the month could be 30, 31, 28, or 29
month=month1-month2;
if(month<0){month+=12;year1-=1;}
year=year1-year2;
Then year,month,day,hour, and minute are set to the difference of time 1 and time 2
second=second1-second2;
if(second<0){second+=60;minute1-=1;}
minute=minute1-minute2;
if(minute<0){minute+=60;hour1-=1;}
hour=hour1-hour2;
if(hour<0){hour+=24;day1-=1;}
day=day1-day2;
if(day<0){day+=30;month1-1;} //the 30 depends on the month could be 30, 31, 28, or 29
month=month1-month2;
if(month<0){month+=12;year1-=1;}
year=year1-year2;
Then year,month,day,hour, and minute are set to the difference of time 1 and time 2