[php][零散代码]php日期计算
<?php $startData = "2020-01-1"; $stopData = "2020-01-31"; $s = new \DateTime($startData); $e = new \DateTime($stopData); $days = $s->diff($e)->days; for ($i=0;$i<=$days;$i++){ echo date('Y-m-d',strtotime("+".$i." day",strtotime($startData)))."\r\n "; } ?>