• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/office365/eventmanager.php
  • Класс: Bitrix\Calendar\Sync\Office365\EventManager
  • Вызов: EventManager::getInstanceForDay
private function getInstanceForDay(string $eventId, Main\Type\Date $dayStart): ? EventDto
{
	$dateFrom = clone $dayStart;
	if ($dateFrom instanceof Main\Type\DateTime)
	{
		$dateFrom->setTime(0,0);
	}
	$dateTo = clone $dateFrom;
	$dateTo->add('1 day');

	$instances = $this->getService()->getEventInstances([
		'filter' => [
			'event_id' => $eventId,
			'from' => $dateFrom->format('c'), //($this->helper::TIME_FORMAT_LONG),
			'to' => $dateTo->format('c'), //($this->helper::TIME_FORMAT_LONG),
		],
	]);

	return $instances ? $instances[0] : null;
}