Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer::transform
Transforms a DateTime object into a date string with the configured format and timezone
Signature
public function transform(DateTime
$value )
Parameters
$value
— object- A DateTime object
Returns
- string
- A value as produced by PHP's date() function
Errors/Exceptions
-
TransformationFailedException
- If the given value is not a \DateTime