class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
Transforms between a normalized time and a localized time string
Methods
|
__construct(string $inputTimezone = null, string $outputTimezone = null, integer $dateFormat = null, integer $timeFormat = null, integer $calendar = \IntlDateFormatter::GREGORIAN, string $pattern = null)
Constructor. |
||
| string|array |
transform(DateTime $dateTime)
Transforms a normalized date into a localized date string/array. |
|
| DateTime |
reverseTransform(string|array $value)
Transforms a localized date string/array into a normalized date. |
Details
at line 44
public
__construct(string $inputTimezone = null, string $outputTimezone = null, integer $dateFormat = null, integer $timeFormat = null, integer $calendar = \IntlDateFormatter::GREGORIAN, string $pattern = null)
Constructor.
at line 81
public string|array
transform(DateTime $dateTime)
Transforms a normalized date into a localized date string/array.
at line 117
public DateTime
reverseTransform(string|array $value)
Transforms a localized date string/array into a normalized date.