DateTimeImmutable
extends DateTimeImmutable
in package
implements
JsonSerializable
Overrides default json encoding of date time objects
Tags
Interfaces, Classes and Traits
Table of Contents
- $useMicroseconds : bool
- __construct() : mixed
- __toString() : string
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON.
Properties
$useMicroseconds
private
bool
$useMicroseconds
Methods
__construct()
public
__construct(bool $useMicroseconds[, DateTimeZone|null $timezone = null ]) : mixed
Parameters
- $useMicroseconds : bool
- $timezone : DateTimeZone|null = null
Return values
mixed —__toString()
public
__toString() : string
Return values
string —jsonSerialize()
Specify data which should be serialized to JSON.
public
jsonSerialize() : mixed
Return values
mixed —data which can be serialized by json_encode, which is a value of any type other than a resource.