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);
    }