DateTimeUtils
in package

Tags
since
1.13.0

Table of Contents

timeNow()  : string
timeToDate()  : float

Methods

timeNow()

public static timeNow([string $format = 'public' ]) : string
Parameters
$format : string = 'public'

Optional. 'public', 'internal' ('H:i') or custom time format. 'public' by default.

Return values
string

timeToDate()

public static timeToDate(DateTime $date[, string $units = 'seconds' ]) : float
Parameters
$date : DateTime
$units : string = 'seconds'

'seconds'|'hours'|'days' Optional. "seconds" by default.

Return values
float

Search results