• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_sceleton.php
  • Класс: CCalendarSceleton
  • Вызов: CCalendarSceleton::GetWeekDaysEx
static function GetWeekDaysEx($weekStart = 'MO')
{
	$days = self::GetWeekDays();
	if ($weekStart === 'MO')
	{
		return $days;
	}

	$res = [];
	$startIndex = false;

	foreach ($days as $k => $day)
	{
		if ($day[2] === $weekStart)
		{
			$startIndex = $k;
		}

		if ($startIndex !== false)
		{
			$res[] = $day;
		}
	}

	for ($i = 0; $i < $startIndex; $i++)
	{
		$res[] = $days[$i];
	}

	return $res;
}