• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/prop_datetime.php
  • Класс: CIBlockPropertyDateTime
  • Вызов: CIBlockPropertyDateTime::checkInternalFormatValue
static function checkInternalFormatValue(string $value): bool
{
	if ($value === '')
	{
		return false;
	}

	$correctValue = date_parse_from_format(self::FORMAT_FULL, $value);
	if ($correctValue['warning_count'] === 0 && $correctValue['error_count'] === 0)
	{
		return true;
	}

	$correctValue = date_parse_from_format(self::FORMAT_SHORT, $value);

	return ($correctValue['warning_count'] === 0 && $correctValue['error_count'] === 0);
}