2011年4月28日

摘要: php实现指定日期之间的间隔天数计算方法$date1 = strtotime('2011-04-30'); //把日期转换成时间戳$date2 = time(); //取当前时间的时间戳$nowtime=strftime("%y年-%m月-%d日 ",$date2); //格式化输出日期$days=round(($date1-$date2)/3600/24); //四舍五入echo "今天是<font color="red">".$nowtime."</font>";echo 阅读全文
posted @ 2011-04-28 13:05 志向不在北京 阅读(1731) 评论(0) 推荐(0) 编辑

导航