PHP Class Ouzo\Utilities\TimeAgo

Datei anzeigen Open project: letsdrink/ouzo Class Usage Examples

Public Methods

Method Description
__construct ( string $date )
create ( string $date ) : TimeAgo Creates TimeAgo object for passed date.
getKey ( ) : string
getParams ( ) : array

Private Methods

Method Description
dateAsTimestamp ( ) : integer
getDateDiff ( ) : integer
isSameDay ( ) : boolean
nowAsTimestamp ( ) : integer
prepare ( ) : void
showJustNow ( ) : boolean
showMinutesAgo ( ) : integer | null
showThisYear ( ) : boolean
showTodayAt ( ) : boolean
showYesterdayAt ( ) : boolean

Method Details

__construct() public method

public __construct ( string $date )
$date string

create() public static method

Creates TimeAgo object for passed date.
public static create ( string $date ) : TimeAgo
$date string
return TimeAgo

getKey() public method

public getKey ( ) : string
return string

getParams() public method

public getParams ( ) : array
return array