• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/report/handler/deal.php
  • Класс: Bitrix\Crm\Integration\Report\Handler\Deal
  • Вызов: Deal::getTimePeriodDiff
private function getTimePeriodDiff()
{
	$filterParameters = $this->getFilterParameters();
	if ($filterParameters['TIME_PERIOD'])
	{
		$toDateValue = new DateTime($filterParameters['TIME_PERIOD']['to']);
		$fromDateValue = new DateTime($filterParameters['TIME_PERIOD']['from']);

		$timePeriodDiff = $toDateValue->getTimestamp() - $fromDateValue->getTimestamp();
	}
	else
	{
		$currentDate = new Date();
		$timePeriodDiff = $currentDate->getTimestamp();
	}

	return $timePeriodDiff;
}