Bash
<?PHP
//今天与2012年11月29日相差多少天
$Date_1=date("Y-m-d");
$Date_2="2012-11-29";
$d1=strtotime($Date_1);
$d2=strtotime($Date_2);
$Days=round(($d1-$d2)/3600/24);
Echo "宝宝出生已经".$Days."天";
Echo "<br>";
//今天到2013年11月29日还有多少天
$Date_1=date("Y-m-d");
$Date_2="2013-11-29";
$d1=strtotime($Date_1);
$d2=strtotime($Date_2);
$Days=round(($d2-$d1)/3600/24);
Echo "离宝宝生日还有".$Days."天";
?>
原文链接:https://www.qiquanji.com/post/5177.html
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

微信扫码关注
更新实时通知