Hi, if I calculate diff between two not intersected periods and try to loop:
Return value of Spatie\Period\PeriodCollection::current() must be an instance of Spatie\Period\Period, null returned
$dayPeriod = Period::make('2019-02-01 15:00:00', '2019-02-01 20:00:00', Precision::MINUTE);
$events = new PeriodCollection(
// $dayPeriod does not contain this event
Period::make('2019-02-01 10:00:00', '2019-02-01 14:00:00', Precision::MINUTE)
);
$periods = $dayPeriod->diff(...$events);
foreach ($periods as $period) { //throw TypeError
var_dump($period);
}
Hi, if I calculate diff between two not intersected periods and try to loop: Return value of Spatie\Period\PeriodCollection::current() must be an instance of Spatie\Period\Period, null returned