DateTimeUtils
in package
Tags
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.