Class

eZDateTime

class eZDateTime

Properties

$Locale
$DateTime
$IsValid

Methods

__construct(eZDate|eZTime|bool $datetime = false)

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

attributes()

hasAttribute($name)

attribute($name)

isValid()

setLocale($locale)

locale()

timeZone()

timeStamp()

setTimeStamp($stamp)

toDate()

toTime()

year()

month()

day()

hour()

minute()

second()

setYear($year)

setMonth($month)

setDay($day)

setHour($hour)

setMinute($min)

setSecond($sec)

setHMS($hour, $min, $sec)

setMDYHMS($month, $day, $year, $hour, $min, $sec)

setMDY($month, $day, $year)

adjustDateTime($hour, $minute, $second, $month, $day, $year)

isGreaterThan($datetime, $equal = false)

isEqualTo($datetime)

duplicate()

toString($short = false)

Details

at line 68
public __construct(eZDate|eZTime|bool $datetime = false)

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

Parameters

eZDate|eZTime|bool $datetime

at line 94
public attributes()

at line 106
public hasAttribute($name)

Parameters

$name

at line 111
public attribute($name)

Parameters

$name

at line 155
public isValid()

at line 163
public setLocale($locale)

Parameters

$locale

at line 171
public locale()

at line 179
public timeZone()

at line 188
public timeStamp()

at line 193
public setTimeStamp($stamp)

Parameters

$stamp

at line 212
public toDate()

at line 223
public toTime()

at line 233
public year()

at line 241
public month()

at line 249
public day()

at line 257
public hour()

at line 265
public minute()

at line 273
public second()

at line 281
public setYear($year)

Parameters

$year

at line 291
public setMonth($month)

Parameters

$month

at line 301
public setDay($day)

Parameters

$day

at line 311
public setHour($hour)

Parameters

$hour

at line 321
public setMinute($min)

Parameters

$min

at line 331
public setSecond($sec)

Parameters

$sec

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

Parameters

$hour
$min
$sec

at line 351
public setMDYHMS($month, $day, $year, $hour, $min, $sec)

Parameters

$month
$day
$year
$hour
$min
$sec

at line 360
public setMDY($month, $day, $year)

Parameters

$month
$day
$year

at line 379
public adjustDateTime($hour, $minute, $second, $month, $day, $year)

Parameters

$hour
$minute
$second
$month
$day
$year

at line 394
public isGreaterThan($datetime, $equal = false)

Parameters

$datetime
$equal

at line 425
public isEqualTo($datetime)

Parameters

$datetime

at line 474
public duplicate()

at line 484
public toString($short = false)

Parameters

$short