• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblock.php
  • Класс: CAllIBlock
  • Вызов: CAllIBlock::isCorrectFullFormatDate
static function isCorrectFullFormatDate($value): bool
{
	$result = true;

	// get user time
	if ($value instanceof MainTypeDateTime && !$value->isUserTimeEnabled())
	{
		$value = clone $value;
		$value->toUserTime();
	}

	// format
	if (($context = MainContext::getCurrent()) && ($culture = $context->getCulture()) !== null)
	{
		$format = $culture->getFormatDatetime();
	}
	else
	{
		$format = CLang::GetDateFormat('FULL');
	}

	$formatDate = CDatabase::FormatDate($value, $format, "YYYY-MM-DD HH:MI:SS");

	if ($formatDate === false || $formatDate === '')
	{
		$result = false;
	}

	return $result;
}