public function jsonSerialize() { $holidays = []; /** @var \DateTime $holiday */ foreach ($this->holidays as $holiday) { $holidays[] = $holiday->format(\DateTime::ISO8601); } return $holidays; }