View/Helper/TaskHelper.php
protected function _dateDiff($start = null, $stop = null) {
		if ($start) {
			$endDate = $stop instanceof DateTime ? $stop : new DateTime($stop ? $stop : 'now');
			$startDate = $start instanceof DateTime ? $start : new DateTime($start);
			$diff = $startDate->diff($endDate)->format(Configure::read('Task.dateDiffFormat'));
			return $this->_isCli ? $diff : $this->Html->tag('span', $diff);
		} else {
			return $this->_none();
		}
	}
protected function _dateDiff($start = null, $stop = null) {
		if ($start) {
			$endDate = $stop instanceof DateTime ? $stop : new DateTime($stop ? $stop : 'now');
			$startDate = $start instanceof DateTime ? $start : new DateTime($start);
			$diff = $startDate->diff($endDate)->format(Configure::read('Task.dateDiffFormat'));
			return $this->_isCli ? $diff : $this->Html->tag('span', $diff);
		} else {
			return $this->_none();
		}
	}
protected function _dateDiff ( $ start = null , $ stop = null ) { if ( $ start ) { $ endDate = $ stop instanceof DateTime ? $ stop : new DateTime ( $ stop ? $ stop : 'now' ) ; $ startDate = $ start instanceof DateTime ? $ start : new DateTime ( $ start ) ; $ diff = $ startDate -> diff ( $ endDate ) -> format ( Configure :: read ( 'Task.dateDiffFormat' ) ) ; return $ this -> _isCli ? $ diff : $ this -> Html -> tag ( 'span' , $ diff ) ; } else { return $ this -> _none ( ) ; } }
Date diff formatter

@param DateTime|string $start
@param DateTime|string $stop
@return string
Date diff formatter