/** * @param string $rawValue * @return \DateTime[] * @throws DateTimeParseException */ private function parseDateTimePartsFromRawValue($rawValue) { list($leftValue, $rightValue) = $this->parseDateTimeStringFromRawValue($rawValue); $left = $this->dateTimeConverter->parse($leftValue); $right = $this->dateTimeConverter->parse($rightValue); if ($right === NULL || $left === NULL) { throw new DateTimeParseException('One part of the interval is missing.'); } return [$left, $right]; }
/** * @return bool */ public function isValid() { return $this->dateConverter->isValid($this->rawValue); }