摘要: #include <iostream>#include <ctime>#include <cstdio>struct tm calc_date_diff(time_t& _second){ //计算年,如果只告诉秒,那么年的概念中是否可以忽略掉闰年的概念的, 因为这个时间段本来就不是一个连续的时间段 //如果你不忽略掉闰年的概念,怎么去计算断断续续的时间总和所持续的时间 struct tm timeinfo; timeinfo.tm_year = _second/(365*24*60*60); _second -= timeinfo.tm_year* 阅读全文
posted @ 2012-09-10 17:29 Zhaoyier 阅读(336) 评论(0) 推荐(0)