/** * Returns string usable by PHP's date functions, null if the format is not matched, * or FALSE if this is not a date field. * * @param string $fieldValue * @return false|null|string */ public function getDateTimeFormatString($fieldValue) { if (!is_string($fieldValue) || '' === $fieldValue) { return null; } if (false === $this->_dateFormatSought) { if ($this->isDateTimeField()) { $this->_dateTimeFormatString = ValueUtility::getFieldDateTimeFormatString($fieldValue); } else { $this->_dateTimeFormatString = false; } $this->_dateFormatSought = true; } return $this->_dateTimeFormatString; }