DateTimeToRfc3339Transformer
extends BaseDateTimeTransformer
in package
Tags
Table of Contents
- $formats : mixed
- $inputTimezone : mixed
- $outputTimezone : mixed
- __construct() : mixed
- reverseTransform() : DateTime|null
- Transforms a formatted string following RFC 3339 into a normalized date.
- transform() : string
- Transforms a normalized date into a localized date.
Properties
$formats
protected
static mixed
$formats
= [\IntlDateFormatter::NONE, \IntlDateFormatter::FULL, \IntlDateFormatter::LONG, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT]
$inputTimezone
protected
mixed
$inputTimezone
$outputTimezone
protected
mixed
$outputTimezone
Methods
__construct()
public
__construct([string|null $inputTimezone = null ][, string|null $outputTimezone = null ]) : mixed
Parameters
- $inputTimezone : string|null = null
-
The name of the input timezone
- $outputTimezone : string|null = null
-
The name of the output timezone
Tags
Return values
mixed —reverseTransform()
Transforms a formatted string following RFC 3339 into a normalized date.
public
reverseTransform(string $rfc3339) : DateTime|null
Parameters
- $rfc3339 : string
-
Formatted string
Tags
Return values
DateTime|null —Normalized date
transform()
Transforms a normalized date into a localized date.
public
transform(DateTimeInterface $dateTime) : string
Parameters
- $dateTime : DateTimeInterface
-
A DateTimeInterface object
Tags
Return values
string —The formatted date