public getDateTime ( ) : DateTime | ||
Результат | DateTime |
public function getDateTime()
{
if ($this->dateTime === null) {
if (preg_match('/^.*\\$Date: ([\\d\\/-]+\\s+[\\d:]+)/m', $this->getContent('Date:'), $match)) {
$this->dateTime = new DateTime($match[1], new DateTimeZone('UTC'));
} else {
throw new \RuntimeException('Unable to detect revision date.');
}
}
return $this->dateTime;
}