• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/integration/view/base.php
  • Класс: BitrixRestIntegrationViewBase
  • Вызов: Base::internalizeDateValue
protected function internalizeDateValue($value): Result
{
	$r = new Result();

	$date = $this->internalizeDate($value);

	if($date instanceof Date)
	{
		$value = $date;
	}
	else
	{
		$r->addError(new Error('Wrong type date'));
	}

	if($r->isSuccess())
	{
		$r->setData([$value]);
	}

	return $r;
}