• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/util.php
  • Класс: BitrixCalendarUtil
  • Вызов: Util::formatEventDateTime
static function formatEventDateTime(DateTime $dateTime): string
{
	$culture = MainApplication::getInstance()->getContext()->getCulture();
	$dayMonthFormat = MainTypeDate::convertFormatToPhp($culture->getDateFormat());
	$timeFormat = $culture->get('SHORT_TIME_FORMAT');

	$eventDate = FormatDate($dayMonthFormat, $dateTime->getTimestamp());
	$eventTime = FormatDate($timeFormat, $dateTime->getTimestamp());

	return "$eventDate $eventTime";
}