Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer::getIntlDateFormatter PHP Method

getIntlDateFormatter() protected method

Returns a preconfigured IntlDateFormatter instance
protected getIntlDateFormatter ( ) : IntlDateFormatter
return IntlDateFormatter
    protected function getIntlDateFormatter()
    {
        $dateFormat = $this->dateFormat;
        $timeFormat = $this->timeFormat;
        $timezone = $this->outputTimezone;
        $calendar = $this->calendar;
        $pattern = $this->pattern;

        $intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern);
        $intlDateFormatter->setLenient(false);

        return $intlDateFormatter;
    }