TaskObject::isExpired

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. TaskObject
  4. isExpired
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/taskobject.php
  • Класс: BitrixTasksInternalsTaskObject
  • Вызов: TaskObject::isExpired
public function isExpired(): bool
{
	$status = (int)$this->getStatus();
	$completedStates = [Status::SUPPOSEDLY_COMPLETED, Status::COMPLETED, Status::DEFERRED];

	if (!$this->getDeadline() || in_array($status, $completedStates, true))
	{
		return false;
	}

	return (DateTime::createFrom($this->getDeadline()))->checkLT(new DateTime());
}

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