Class humhub\widgets\TimeAgo

Inheritancehumhub\widgets\TimeAgo » yii\base\Widget

Shows a given date & time as automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$timestamp string Database (Y-m-d H:i:s) or Unix timestamp humhub\widgets\TimeAgo

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getFullDateTime() Returns full date as text humhub\widgets\TimeAgo

Property Details

$timestamp public property

Database (Y-m-d H:i:s) or Unix timestamp

public string $timestamp null

Method Details

getFullDateTime() protected method

Returns full date as text

protected string getFullDateTime ( )
init() public method

public void init ( )
renderDateTime() public method

Show full date

public string renderDateTime ( $elapsed )
return string

Output of full date and time

renderTimeAgo() public method

Render TimeAgo Javascript

public string renderTimeAgo ( )
return string

Timeago span

run() public method

public void run ( )