Bitrix API

Date extends BaseProperty

Table of Contents

Methods

__clone()  : void
__construct()  : mixed
__toString()  : string
add()  : Date
return clone object. original object not change
createDateFromFormat()  : Date
createDateTimeFromFormat()  : Date
format()  : string
getDate()  : Date
getDateTimeFormat()  : mixed|string
getDay()  : int
getFields()  : array<string|int, mixed>
getHour()  : int
getMinutes()  : int
getMonth()  : int
getSeconds()  : int
getTimestamp()  : int
getYear()  : int
isDateTime()  : bool
isStartDay()  : bool
resetTime()  : $this
setDateTimeFormat()  : $this
setTime()  : $this
setTimezone()  : $this
sub()  : Date
return clone object. original object not change
toString()  : string

Methods

__clone()

public __clone() : void

__construct()

public __construct([Date|null $date = null ][, string|null $dateFormat = null ]) : mixed
Parameters
$date : Date|null = null
$dateFormat : string|null = null
Tags
throws
ObjectException

__toString()

public __toString() : string
Return values
string

add()

return clone object. original object not change

public add(string $addTime) : Date
Parameters
$addTime : string
Return values
Date

createDateFromFormat()

public static createDateFromFormat(string $date, string $format) : Date
Parameters
$date : string
$format : string
Tags
throws
ObjectException
Return values
Date

createDateTimeFromFormat()

public static createDateTimeFromFormat(string $date, string $format) : Date
Parameters
$date : string
$format : string
Tags
throws
ObjectException
Return values
Date

format()

public format([string|null $format = null ]) : string
Parameters
$format : string|null = null
Return values
string

getDateTimeFormat()

public getDateTimeFormat() : mixed|string
Return values
mixed|string

getDay()

public getDay() : int
Return values
int

getFields()

public getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHour()

public getHour() : int
Return values
int

getMinutes()

public getMinutes() : int
Return values
int

getMonth()

public getMonth() : int
Return values
int

getSeconds()

public getSeconds() : int
Return values
int

getTimestamp()

public getTimestamp() : int
Return values
int

getYear()

public getYear() : int
Return values
int

isDateTime()

public isDateTime() : bool
Return values
bool

isStartDay()

public isStartDay() : bool
Return values
bool

resetTime()

public resetTime() : $this
Return values
$this

setDateTimeFormat()

public setDateTimeFormat(string $format) : $this
Parameters
$format : string
Return values
$this

setTime()

public setTime(int $hour, int $minutes, int $seconds) : $this
Parameters
$hour : int
$minutes : int
$seconds : int
Return values
$this

setTimezone()

public setTimezone(DateTimeZone $timeZone) : $this
Parameters
$timeZone : DateTimeZone
Return values
$this

sub()

return clone object. original object not change

public sub(string $subtractTime) : Date
Parameters
$subtractTime : string
Return values
Date

toString()

public toString() : string
Return values
string

        
On this page

Search results