• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/ical/mailinvitation/helper.php
  • Класс: BitrixCalendarICalMailInvitationHelper
  • Вызов: Helper::getIcalTemplateDate
static function getIcalTemplateDate(array $params = null): string
{
	$from = self::getDateObject($params['DATE_FROM'], false, $params['TZ_FROM']);
	$to = self::getDateObject($params['DATE_TO'], false, $params['TZ_TO']);
	if ($from->format('dmY') !== $to->format('dmY'))
	{
		$res = $params['FULL_DAY']
			? $from->format('d.m.Y') . ' - ' . $to->format('d.m.Y')
			: $from->format('d.m.Y H:i') . ' - ' . $to->format('d.m.Y H:i');
	}
	else
	{
		$res = $params['FULL_DAY']
			? $from->format('d.m.Y')
			: $from->format('d.m.Y H:i') . ' - ' . $to->format('H:i');
	}

	return $res;
}