PHP获取当前周一、周末时间等(持续更新)
作者:互联网
获取周一和周日的日期
$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"
标签:00,07,dump,获取,strtotime,周末,Sunday,date,PHP 来源: https://www.cnblogs.com/xfstu/p/16472282.html