/** * Gets a publishing date * @param string $baseName The base name; 'PublishFrom' or 'PublishTo' * @return Date Returns the date */ private function PublishDate($baseName) { if (!$this->page->GetPublish()) { return null; } $strDate = $this->Value($baseName . 'Date'); if (!$strDate) { return null; } $date = \DateTime::createFromFormat($this->dateFormat, $strDate); $date->setTime((int) $this->Value($baseName . 'Hour'), (int) $this->Value($baseName . 'Minute'), 0); return Date::FromDateTime($date); }