Commit 0984225e authored by Thomas Löffler's avatar Thomas Löffler

Shows the upload date of first version in "first upload"

parent a319e6f0
Pipeline #3530 passed with stages
in 5 minutes and 8 seconds
......@@ -638,4 +638,19 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
return json_encode($versions);
}
/**
* @return \DateTime|null
*/
public function getDateOfFirstUpload()
{
if ($this->versions->count() === 0) {
return null;
}
$firstVersion = $this->getReverseVersionsByVersionNumber(1)[0];
$dateOfFirstUpload = new \DateTime();
$dateOfFirstUpload->setTimestamp($firstVersion->getUploadDate());
return $dateOfFirstUpload;
}
}
......@@ -18,7 +18,7 @@
<f:translate key="first_upload" />
</dt>
<dd>
<f:format.date format="%d. %b %Y">{extension.crdate}</f:format.date>
<f:format.date format="%d. %b %Y">{extension.dateOfFirstUpload}</f:format.date>
</dd>
<dt>
<f:translate key="downloads" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment