• Модуль: mobile
  • Путь к файлу: ~/bitrix/modules/mobile/lib/rest/tasks.php
  • Класс: BitrixMobileRestTasks
  • Вызов: Tasks::getDeadlines
static function getDeadlines(): array
{
	$tomorrow = MakeTimeStamp(TimeLineTable::getDateClient().' 23:59:59') + 86400;
	$deadlines = ['tomorrow' => (new DateTime(TimeLineTable::getClosestWorkHour($tomorrow)))->getTimestamp()];
	$map = [
		'PERIOD2' => 'today',
		'PERIOD3' => 'thisWeek',
		'PERIOD4' => 'nextWeek',
		'PERIOD6' => 'moreThanTwoWeeks',
	];
	foreach (TimeLineTable::getStages() as $key => $val)
	{
		if (array_key_exists($key, $map))
		{
			$deadlines[$map[$key]] = (new DateTime($val['UPDATE']['DEADLINE']))->getTimestamp();
		}
	}

	return $deadlines;
}