class DateTimeToStringTransformer extends BaseDateTimeTransformer
Transforms between a date string and a DateTime object
__construct(string $inputTimezone = null, string $outputTimezone = null, string $format = 'Y-m-d H:i:s', bool $parseUsingPipe = null) Transforms a \DateTime instance to a string | ||
string | transform(DateTime $value) Transforms a DateTime object into a date string with the configured format and timezone | |
DateTime | reverseTransform(string $value) Transforms a date string in the configured timezone into a DateTime object. |
Transforms a \DateTime instance to a string
Transforms a DateTime object into a date string with the configured format and timezone
Transforms a date string in the configured timezone into a DateTime object.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.html