src/DateExtension.php
protected function getDateFormatter($dateFormat, $timeFormat, $calendar)
    {
        $datetype = isset($dateFormat) ? $this->getFormat($dateFormat) : null;
        $timetype = isset($timeFormat) ? $this->getFormat($timeFormat) : null;

        $calendarConst = $calendar === 'traditional' ? \IntlDateFormatter::TRADITIONAL : \IntlDateFormatter::GREGORIAN;
        
        $pattern = $this->getDateTimePattern(
            isset($datetype) ? $datetype : $dateFormat,
            isset($timetype) ? $timetype : $timeFormat,
            $calendarConst
        );
        
        return new \IntlDateFormatter(\Locale::getDefault(), $datetype, $timetype, null, $calendarConst, $pattern);
    }
protected function getDateFormatter($dateFormat, $timeFormat, $calendar)
    {
        $datetype = isset($dateFormat) ? $this->getFormat($dateFormat) : null;
        $timetype = isset($timeFormat) ? $this->getFormat($timeFormat) : null;

        $calendarConst = $calendar === 'traditional' ? \IntlDateFormatter::TRADITIONAL : \IntlDateFormatter::GREGORIAN;
        
        $pattern = $this->getDateTimePattern(
            isset($datetype) ? $datetype : $dateFormat,
            isset($timetype) ? $timetype : $timeFormat,
            $calendarConst
        );
        
        return new \IntlDateFormatter(\Locale::getDefault(), $datetype, $timetype, null, $calendarConst, $pattern);
    }
protected function getDateFormatter ( $ dateFormat , $ timeFormat , $ calendar ) { $ datetype = isset ( $ dateFormat ) ? $ this -> getFormat ( $ dateFormat ) : null ; $ timetype = isset ( $ timeFormat ) ? $ this -> getFormat ( $ timeFormat ) : null ; $ calendarConst = $ calendar === 'traditional' ? \ IntlDateFormatter :: TRADITIONAL : \ IntlDateFormatter :: GREGORIAN ; $ pattern = $ this -> getDateTimePattern ( isset ( $ datetype ) ? $ datetype : $ dateFormat , isset ( $ timetype ) ? $ timetype : $ timeFormat , $ calendarConst ) ; return new \ IntlDateFormatter ( \ Locale :: getDefault ( ) , $ datetype , $ timetype , null , $ calendarConst , $ pattern ) ; }
Get configured intl date formatter.

@param string|null $dateFormat
@param string|null $timeFormat
@param string      $calendar
@return \IntlDateFormatter
Get configured intl date formatter .