Methods

Constructor

__construct(string $format, \DateTimeZone $timezone) 

Parameters

$format

string

$timezone

\DateTimeZonenull

Converts the given value so that it can be extracted by the hydrator.

extract(mixed | \DateTime $value) : mixed | string

Converts to date time string

Parameters

$value

mixed\DateTime

Returns

mixedstring

Converts date time string to DateTime instance for injecting to object

hydrate(mixed | string $value) : mixed | \DateTime

Parameters

$value

mixedstring

Returns

mixed\DateTime

 Properties

 

$format

$format : string

 

$timezone

$timezone : \DateTimeZone | null