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
__toString()
public
__toString() : string
Return values
stringadd()
return clone object. original object not change
public
add(string $addTime) : Date
Parameters
- $addTime : string
Return values
DatecreateDateFromFormat()
public
static createDateFromFormat(string $date, string $format) : Date
Parameters
- $date : string
- $format : string
Tags
Return values
DatecreateDateTimeFromFormat()
public
static createDateTimeFromFormat(string $date, string $format) : Date
Parameters
- $date : string
- $format : string
Tags
Return values
Dateformat()
public
format([string|null $format = null ]) : string
Parameters
- $format : string|null = null
Return values
stringgetDate()
public
getDate() : Date
Return values
DategetDateTimeFormat()
public
getDateTimeFormat() : mixed|string
Return values
mixed|stringgetDay()
public
getDay() : int
Return values
intgetFields()
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getHour()
public
getHour() : int
Return values
intgetMinutes()
public
getMinutes() : int
Return values
intgetMonth()
public
getMonth() : int
Return values
intgetSeconds()
public
getSeconds() : int
Return values
intgetTimestamp()
public
getTimestamp() : int
Return values
intgetYear()
public
getYear() : int
Return values
intisDateTime()
public
isDateTime() : bool
Return values
boolisStartDay()
public
isStartDay() : bool
Return values
boolresetTime()
public
resetTime() : $this
Return values
$thissetDateTimeFormat()
public
setDateTimeFormat(string $format) : $this
Parameters
- $format : string
Return values
$thissetTime()
public
setTime(int $hour, int $minutes, int $seconds) : $this
Parameters
- $hour : int
- $minutes : int
- $seconds : int
Return values
$thissetTimezone()
public
setTimezone(DateTimeZone $timeZone) : $this
Parameters
- $timeZone : DateTimeZone
Return values
$thissub()
return clone object. original object not change
public
sub(string $subtractTime) : Date
Parameters
- $subtractTime : string
Return values
DatetoString()
public
toString() : string