• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/restview/product.php
  • Класс: BitrixCatalogRestViewProduct
  • Вызов: Product::internalizeDateValue
protected function internalizeDateValue($value): Result
{
	//API does not accept DataTime objects, so the ISO format is transformed into a format for a filter.

	$r = new Result();

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

	if ($date instanceof Date)
	{
		$value = $date->format('d.m.Y');
	}
	else
	{
		$r->addError(new Error('Wrong type data'));
	}

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

	return $r;
}