25 private $localeResolver;
34 ? !defined(
'HHVM_VERSION')
43 private function getLocaleResolver()
45 if ($this->localeResolver ===
null) {
47 \
Magento\Framework\Locale\ResolverInterface::class
50 return $this->localeResolver;
58 $locale = (
null === $locale) ? $this->getLocaleResolver()->getLocale() : $locale;
59 if ($this->useIntlFormatObject) {
60 return \IntlDateFormatter::formatObject($object,
$format, $locale);
76 $pattern = $dateFormat = $timeFormat = $calendar =
null;
79 list($dateFormat, $timeFormat) =
$format;
83 $dateFormat = $timeFormat = \IntlDateFormatter::MEDIUM;
87 new Phrase(
'The format type is invalid. Verify the format type and try again.')
91 $timezone = $object->getTimezone();
92 if ($object instanceof \IntlCalendar) {
93 $timezone = $timezone->toDateTimeZone();
95 $timezone = $timezone->getName();
97 if ($timezone ===
'+00:00') {
99 }
elseif ($timezone[0] ===
'+' || $timezone[0] ===
'-') {
100 $timezone =
'GMT' . $timezone;
103 return (
new \IntlDateFormatter($locale, $dateFormat, $timeFormat, $timezone, $calendar,
$pattern))
elseif(isset( $params[ 'redirect_parent']))