<?php $start = new DateTime('2019-01-01'); $end = new DateTime('2019-02-27'); $interval = new DateInterval('P19D'); while ($start < $end) { echo $start->format('Y-m-d') . ' => '; $start->add($interval); echo min($start, $end)->format('Y-m-d') . "\n"; $start->add(new DateInterval('P1D')); }
You have javascript disabled. You will not be able to edit any code.