Olympic countdown board how to do it?
Users questions:
Experts answer: interface easy to say, the key is the countdown to the preparation and testing procedures. Provide two important functions are available for reference (C * C ++):( 1) compare two date strings, returns the number of days difference. longdatediff (char * date_str, char * date0_str,char*format){longyear0=date_year(date0_str,format);longyear=date_year(date_str,format);longmonth0=date_month(date0_str,format);longmonth=date_month(date_str,format);longday0=date_day(date0_str,format);longday=date_day(date_str,format);day0+=yrdaysFun_70(year0);day+=yrdaysFun_70(year);for(longi=1;i month0;i++)day0+=mthdaysFun(i,year0);for(i=1;i month;i++)day+=mthdaysFun(i,year);*********************************************************** Longret = day- day0; returnret;) (2) two time series (including date) compared to the number of seconds to return difference. doubletimediff(char*time_str,char*time0){strcpy(buf0,time0);**init.strcpy(buf,time_str);primDatestr(buf0); primDatestr (buf );****************************************** ***************** longdd = datediff (buf,buf0, mm*dd*yyyy );doubleret=24*3600*dd;strcpy(buf0,time0);**NoChange!strcpy(buf,time_str);primTimestr(buf0);primTimestr(buf);***********************************************************ret+=timefun(buf)-timefun (buf0); returnret;)