public function split($interval)
{
$startDate = $this->startDate;
$interval = static::filterDateInterval($interval);
do {
$endDate = $startDate->add($interval);
if ($endDate > $this->endDate) {
$endDate = $this->endDate;
}
(yield new static($startDate, $endDate));
$startDate = $endDate;
} while ($startDate < $this->endDate);
}