\um\coreDate_Time

Class Date_Time

Summary

Methods
Properties
Constants
get_time()
time_diff()
get_age()
format()
get_last_days()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_time()

get_time( $format) : int|string

Display time in specific format

Parameters

$format

Returns

int|string

time_diff()

time_diff(int  $from, int  $to = '') : string

Show a cool time difference between 2 timestamps

Parameters

int $from
int $to

Returns

string

get_age()

get_age(string  $then) : string

Get age.

Parameters

string $then

Returns

string

format()

format( $old,  $new) : string

Reformat dates

Parameters

$old
$new

Returns

string

get_last_days()

get_last_days(int  $num = 30, bool  $reverse = true) : array

Get last 30 days as array

Parameters

int $num
bool $reverse

Returns

array