DateTimeToLocalizedStringTransformer
class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
Transforms between a normalized time and a localized time string.
Properties
static protected | $formats | from BaseDateTimeTransformer | |
protected | $inputTimezone | from BaseDateTimeTransformer | |
protected | $outputTimezone | from BaseDateTimeTransformer |
Methods
__construct(string $inputTimezone = null, string $outputTimezone = null, int $dateFormat = null, int $timeFormat = null, int $calendar = \IntlDateFormatter::GREGORIAN, string $pattern = null)
No description
mixed
transform(DateTimeInterface $dateTime)
Transforms a normalized date into a localized date string/array.
mixed
reverseTransform(mixed $value)
Transforms a localized date string/array into a normalized date.
getIntlDateFormatter(bool $ignoreTimezone = false)
Returns a preconfigured IntlDateFormatter instance.
bool
isPatternDateOnly()
Checks if the pattern contains only a date.
Details
__construct(string $inputTimezone = null, string $outputTimezone = null, int $dateFormat = null, int $timeFormat = null, int $calendar = \IntlDateFormatter::GREGORIAN, string $pattern = null)
mixed
transform(DateTimeInterface $dateTime)
Transforms a normalized date into a localized date string/array.
mixed
reverseTransform(mixed $value)
Transforms a localized date string/array into a normalized date.
protected IntlDateFormatter
getIntlDateFormatter(bool $ignoreTimezone = false)
Returns a preconfigured IntlDateFormatter instance.