$week_now = date("w");
$week_start = strtotime("-$week_now days",time());
$week_end = strtotime("+".(6-$week_now)." days",time());
echo date("Y-m-d",$week_start)."
";
echo date("Y-m-d",$week_end);
?>
$week_now = date("w");
$week_start = strtotime("-$week_now days",time());
$week_end = strtotime("+".(6-$week_now)." days",time());
echo date("Y-m-d",$week_start)."
";
echo date("Y-m-d",$week_end);
?>
本文标题:PHP 当周日期
本文链接:https://www.haomeiwen.com/subject/vssdettx.html
网友评论