php生成连续的日期时间段
$startTime = '2021-01-1';
$endTime = '2021-2-1';
$list = range(strtotime($startTime), strtotime($endTime), 24*60*60);
$list = array_map(function($v){
return date("Y-m-d", $v);
}, $list);
print_r($list);
/// [0] => 2021-01-01
[1] => 2021-01-02
[2] => 2021-01-03
[3] => 2021-01-04
[4] => 2021-01-05
[5] => 2021-01-06
[6] => 2021-01-07