a PHP DateTime object. You may set the time zone
for the DateTime object to specify the source time zone.

The formatter will convert date values according to $timeZone before formatting it.
If no timezone conversion should be performed, you need to set $defaultTimeZone and $timeZone to the same value.
Also no conversion will be performed on values that have no time information, e.g. "2017-06-05".

$format (string, null) – The format used to convert the value into a date string.
If null, $dateFormat will be used.

This can be "short", "medium", "long", or "full", which represents a preset format of different lengths.
It can also be a custom format as specified in the ICU manual.

Alternatively this can be a string prefixed with php: representing a format that can be recognized by the
PHP date()-function.

$format (string, null) – The format used to convert the value into a date string.
If null, $dateFormat will be used.
This can be "short", "medium", "long", or "full", which represents a preset format of different lengths.
It can also be a custom format as specified in the ICU manual.
Alternatively this can be a string prefixed with php: representing a format that can be recognized by the
PHP date()-function.