17 public function toString(
string $separator =
';'): string
23 fn (
Date $date) => $date->
format(\CCalendar::DFormat(
false)),
34 $timestamp = (
new Date())->sub($interval)->getTimestamp();
36 $exdateCollection =
new static();
39 foreach ($this->collection as $item)
41 if ($item->getTimestamp() > $timestamp)
43 $exdateCollection->
add($item);
47 return $exdateCollection;
54 public function removeDateFromCollection(
Date $date): void
60 foreach ($this->collection as $key => $item)
62 if ($item->format(
'd.m.Y') === $date->
format(
'd.m.Y'))
64 unset($this->collection[$key]);