获取周一和周日的日期
$Monday = strtotime('today +' . (8 - date('w')) . 'day -1second');
$Sunday = strtotime('today -' . (date('w') - 1) . 'day');
dump(date('m-d H:i:s', $Monday)); // string(14) "07-24 23:59:59"
dump(date('m-d H:i:s', $Sunday)); // string(14) "07-18 00:00:00"
原创文章,作者:,如若转载,请注明出处:https://blog.ytso.com/tech/php/273914.html