Date
extends DateTime
in package
Table of Contents
Methods
- __construct() : mixed
- Date constructor
- __toString() : mixed
- asDate() : Date
- Clone as Date
- asDateTime() : DateTime
- Clone as DateTime
- getDaysTo() : int
- Get days to reach other date
- isAfter() : bool
- Test this date is after the other one
- jsonSerialize() : string
Methods
__construct()
Date constructor
public
__construct([string|null $date = null ]) : mixed
Parameters
- $date : string|null = null
-
SQL Date
Tags
__toString()
public
__toString() : mixed
Tags
asDate()
Clone as Date
public
asDate() : Date
Tags
Return values
DateasDateTime()
Clone as DateTime
public
asDateTime() : DateTime
Tags
Return values
DateTimegetDaysTo()
Get days to reach other date
public
getDaysTo([DateTime|null $otherDate = null ]) : int
Parameters
- $otherDate : DateTime|null = null
Return values
intisAfter()
Test this date is after the other one
public
isAfter(DateTime $otherDatetime) : bool
Parameters
- $otherDatetime : DateTime
Return values
booljsonSerialize()
public
jsonSerialize() : string