CAllCrmActivity::IsCurrentDay

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmActivity
  4. IsCurrentDay
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_activity.php
  • Класс: \CAllCrmActivity
  • Вызов: CAllCrmActivity::IsCurrentDay
static function IsCurrentDay($time)
{
	if(self::$CURRENT_DAY_TIME_STAMP === null || self::$NEXT_DAY_TIME_STAMP === null)
	{
		$t = time() + CTimeZone::GetOffset();
		self::$CURRENT_DAY_TIME_STAMP = mktime(0, 0, 0, date('n', $t), date('j', $t), date('Y', $t));
		$t += 86400;
		self::$NEXT_DAY_TIME_STAMP = mktime(0, 0, 0, date('n', $t), date('j', $t), date('Y', $t));
	}

	return $time >= self::$CURRENT_DAY_TIME_STAMP && $time < self::$NEXT_DAY_TIME_STAMP;
}

Добавить комментарий