标签:
function count_days($a,$b){ $a_dt=getdate($a); $b_dt=getdate($b); $a_new=mktime(12,0,0,$a_dt[‘mon‘],$a_dt[‘mday‘],$a_dt[‘year‘]); $b_new=mktime(12,0,0,$b_dt[‘mon‘],$b_dt[‘mday‘],$b_dt[‘year‘]); return round(abs($a_new-$b_new)/86400); }
调用方式:
count_days(strtotime($e_time),strtotime($x_time));
标签:
原文地址:http://www.cnblogs.com/Mwsoft/p/4331686.html