class DateTimeToRfc3339Transformer extendsBaseDateTimeTransformer

Methods

string
transform(mixed$dateTime)

Transforms a normalized date into a localized date.

DateTime|null
reverseTransform(mixed$rfc3339)

Transforms a formatted string following RFC 3339 into a normalized date.

Details

string transform(mixed$dateTime)

Transforms a normalized date into a localized date.

Parameters

mixed $dateTime A DateTimeInterface object

Return Value

string

Exceptions

TransformationFailedException If the given value is not a \DateTimeInterface

DateTime|null reverseTransform(mixed$rfc3339)

Transforms a formatted string following RFC 3339 into a normalized date.

Parameters

mixed $rfc3339 Formatted string

Return Value

DateTime|null

Exceptions

TransformationFailedException If the given value is not a string, if the value could not be transformed