$start1 = date("Y-m-d", strtotime('monday last week'));
$end1 = date("Y-m-d", strtotime('monday this week - 1 days'));
$start2 = date("Y-m-d", strtotime('monday -3 week'));
$end2 = date("Y-m-d", strtotime('monday -2 week - 1 days'));
$start3 = date("Y-m-d", strtotime('monday -4 week'));
$end3 = date("Y-m-d", strtotime('monday -3 week - 1 days'));
$start4 = date("Y-m-d", strtotime('monday -5 week'));
$end4 = date("Y-m-d", strtotime('monday -4 week - 1 days'));
echo " 1: $start4\n";
echo " : $end4\n";
die;
上个月:
$start = date(“Ym01”, strtotime(“last month”));
$end = date(“Ym01”);
PHP-获取上周一周的日期
最新推荐文章于 2024-04-16 16:34:03 发布