• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sharing/helper.php
  • Класс: BitrixCalendarSharingHelper
  • Вызов: Helper::formatDate
static function formatDate(Date $date): string
{
	$culture = MainApplication::getInstance()->getContext()->getCulture();
	$dayMonthFormat = MainTypeDate::convertFormatToPhp($culture->get('DAY_MONTH_FORMAT'));
	$timeFormat = $culture->get('SHORT_TIME_FORMAT');
	$weekDayFormat = 'l';

	$timestampUTCWithServerOffset = self::getUserDateTimestamp($date);
	$dayMonth = FormatDate($dayMonthFormat, $timestampUTCWithServerOffset);
	$time = FormatDate($timeFormat, $timestampUTCWithServerOffset);
	$weekDay = mb_strtolower(FormatDate($weekDayFormat, $timestampUTCWithServerOffset));

	return "$dayMonth $time, $weekDay";
}