\um\coreDate_Time

Class Date_Time

Summary

Methods
Properties
Constants
__construct()
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

__construct()

__construct() 

Date_Time constructor.

get_time()

get_time(  $format) : integer|string

Display time in specific format

Parameters

$format

Returns

integer|string

time_diff()

time_diff(  $from, string  $to = '') : mixed|void

Show a cool time difference between 2 timestamps

Parameters

$from
string $to

Returns

mixed|void

get_age()

get_age(  $then) : string

Get age

Parameters

$then

Returns

string

format()

format(  $old,   $new) : string

Reformat dates

Parameters

$old
$new

Returns

string

get_last_days()

get_last_days(integer  $num = 30, boolean  $reverse = true) : array

Get last 30 days as array

Parameters

integer $num
boolean $reverse

Returns

array