PHP Class Zfplanet_View_Helper_TimeSince, ZFPlanet

Inheritance: extends Zend_View_Helper_Abstract
Afficher le fichier Open project: padraic/ZFPlanet

Protected Properties

Свойство Type Description
$_now

Méthodes publiques

Méthode Description
__construct ( )
timeSince ( string $date ) : integer Calculate number of days/hours/minutes since the provided date (must be ISO 8601 date).

Method Details

__construct() public méthode

public __construct ( )

timeSince() public méthode

Because this adds partial days, we just round the result up or down to get the closest number of "full" days/hours/minutes. Note that we only use ONE measure. If it's less than a day, we return hours. If less than an hour...
public timeSince ( string $date ) : integer
$date string ISO 8601 compatible date
Résultat integer

Property Details

$_now protected_oe property

protected $_now