protected function setDate(Release $release, $line)
	{
		$matches = [];
		if (preg_match('/[0-9]{4,}-[0-9]{2,}-[0-9]{2,}/', $line, $matches))
		{
			$date = DateTime::createFromFormat('Y-m-d', $matches[0]);
			if ($date)
			{
				$release->setDate($date);
			}
		}
	}
protected function setDate(Release $release, $line)
	{
		$matches = [];
		if (preg_match('/[0-9]{4,}-[0-9]{2,}-[0-9]{2,}/', $line, $matches))
		{
			$date = DateTime::createFromFormat('Y-m-d', $matches[0]);
			if ($date)
			{
				$release->setDate($date);
			}
		}
	}
protected function setDate ( Release $ release , $ line ) { $ matches = [ ] ; if ( preg_match ( '/[0-9]{4,}-[0-9]{2,}-[0-9]{2,}/' , $ line , $ matches ) ) { $ date = DateTime :: createFromFormat ( 'Y-m-d' , $ matches [ 0 ] ) ; if ( $ date ) { $ release -> setDate ( $ date ) ; } } }
Extracts and sets the release Date.

@param Release $release
@param string  $line
Extracts and sets the release Date .