class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer
static protected | $formats | from BaseDateTimeTransformer | |
protected | $inputTimezone | from BaseDateTimeTransformer | |
protected | $outputTimezone | from BaseDateTimeTransformer |
__construct(string $inputTimezone = null, string $outputTimezone = null) | from BaseDateTimeTransformer | |
mixed | transform(DateTimeInterface $dateTime) Transforms a normalized date into a localized date. | |
mixed | reverseTransform(string $rfc3339) Transforms a formatted string following RFC 3339 into a normalized date. |
string | $inputTimezone | The name of the input timezone |
string | $outputTimezone | The name of the output timezone |
InvalidArgumentException | if a timezone is not valid |
Transforms a normalized date into a localized date.
DateTimeInterface | $dateTime | A DateTimeInterface object |
mixed | The value in the transformed representation |
TransformationFailedException | If the given value is not a \DateTimeInterface |
Transforms a formatted string following RFC 3339 into a normalized date.
string | $rfc3339 | Formatted string |
mixed | The value in the original representation |
TransformationFailedException | If the given value is not a string, if the value could not be transformed |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.html