JsonDateTime
extends DateTime
in package
implements
JsonSerializable
Interfaces, Classes, Traits and Enums
- JsonSerializable
Table of Contents
- __construct() : mixed
- __toString() : string
- formats datetime to format acceptable by database
- getDate() : string
- returns date in format Y-m-d
- getTime() : string
- returns time in format H:i:s
- jsonSerialize() : string
- {@inheritDoc}
Methods
__construct()
public
__construct(mixed $dateString) : mixed
Parameters
- $dateString : mixed
Return values
mixed —__toString()
formats datetime to format acceptable by database
public
__toString() : string
Return values
string —getDate()
returns date in format Y-m-d
public
getDate() : string
Return values
string —getTime()
returns time in format H:i:s
public
getTime() : string
Return values
string —jsonSerialize()
{@inheritDoc}
public
jsonSerialize() : string