Class

eZTime

class eZTime

Constants

SECONDS_A_MINUTE

SECONDS_AN_HOUR

SECONDS_A_DAY

Properties

$Locale
$Time

Methods

__construct(int|bool $timestamp = false)

Creates a new time object with default locale, if $time is not supplied the current time is used.

attributes()

hasAttribute($name)

attribute($name)

isValid()

setLocale($locale)

locale()

setHour($hour)

setMinute($min)

setSecond($sec)

setHMS($hour, $min, $sec)

hour()

minute()

second()

timeStamp()

setTimeStamp($timestamp)

timeOfDay()

setTimeOfDay($timestamp)

adjustTime($hour, $minute, $second)

duplicate()

isGreaterThan($time, $equal = false)

isEqualTo($time)

toString($short = false)

Details

at line 80
public __construct(int|bool $timestamp = false)

Creates a new time object with default locale, if $time is not supplied the current time is used.

Parameters

int|bool $timestamp

at line 97
public attributes()

at line 107
public hasAttribute($name)

Parameters

$name

at line 112
public attribute($name)

Parameters

$name

at line 134
public isValid()

at line 142
public setLocale($locale)

Parameters

$locale

at line 150
public locale()

at line 158
public setHour($hour)

Parameters

$hour

at line 167
public setMinute($min)

Parameters

$min

at line 176
public setSecond($sec)

Parameters

$sec

at line 185
public setHMS($hour, $min, $sec)

Parameters

$hour
$min
$sec

at line 194
public hour()

at line 202
public minute()

at line 210
public second()

at line 218
public timeStamp()

at line 233
public setTimeStamp($timestamp)

Parameters

$timestamp

at line 245
public timeOfDay()

at line 253
public setTimeOfDay($timestamp)

Parameters

$timestamp

at line 266
public adjustTime($hour, $minute, $second)

Parameters

$hour
$minute
$second

at line 292
public duplicate()

at line 303
public isGreaterThan($time, $equal = false)

Parameters

$time
$equal

at line 322
public isEqualTo($time)

Parameters

$time

at line 336
public toString($short = false)

Parameters

$short