public function timeAgo($time = null, $format = null) {
		if (empty($time)) {
			$time = time();
		}
		if (empty($format)) {
			$format = '%x %X';
		}

		$result = $this->Html->tag(
			'time',
			$this->Time->i18nFormat($time, $format),
			[
				'data-toggle' => 'timeago',
				'datetime' => date('c', $this->Time->fromString($time)),
				'class' => 'help'
			]
		);

		return $result;
	}
public function timeAgo($time = null, $format = null) {
		if (empty($time)) {
			$time = time();
		}
		if (empty($format)) {
			$format = '%x %X';
		}

		$result = $this->Html->tag(
			'time',
			$this->Time->i18nFormat($time, $format),
			[
				'data-toggle' => 'timeago',
				'datetime' => date('c', $this->Time->fromString($time)),
				'class' => 'help'
			]
		);

		return $result;
	}
public function timeAgo ( $ time = null , $ format = null ) { if ( empty ( $ time ) ) { $ time = time ( ) ; } if ( empty ( $ format ) ) { $ format = '%x %X' ; } $ result = $ this -> Html -> tag ( 'time' , $ this -> Time -> i18nFormat ( $ time , $ format ) , [ 'data-toggle' => 'timeago' , 'datetime' => date ( 'c' , $ this -> Time -> fromString ( $ time ) ) , 'class' => 'help' ] ) ; return $ result ; }
Return HTML element of time ago

@param int|string|DateTime $time UNIX timestamp, strtotime() valid string
or DateTime object
@param string $format strftime format string
@return string HTML element of time ago
@link http://timeago.yarp.com
Return HTML element of time ago