public function formatDate(\DateTimeInterface $date, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT)
    {
        DatesReader::validateFormatLength($formatLength);
        return $this->doFormattingWithParsedFormat($date, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_DATE, $formatLength), $this->datesReader->getLocalizedLiteralsForLocale($locale));
    }
public function formatDate(\DateTimeInterface $date, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT)
    {
        DatesReader::validateFormatLength($formatLength);
        return $this->doFormattingWithParsedFormat($date, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_DATE, $formatLength), $this->datesReader->getLocalizedLiteralsForLocale($locale));
    }
public function formatDate ( \ DateTimeInterface $ date , Locale $ locale , $ formatLength = DatesReader :: FORMAT_LENGTH_DEFAULT ) { DatesReader :: validateFormatLength ( $ formatLength ) ; return $ this -> doFormattingWithParsedFormat ( $ date , $ this -> datesReader -> parseFormatFromCldr ( $ locale , DatesReader :: FORMAT_TYPE_DATE , $ formatLength ) , $ this -> datesReader -> getLocalizedLiteralsForLocale ( $ locale ) ) ; }
Formats date with format string for date defined in CLDR for particular
locale.

@param \DateTimeInterface $date PHP object representing particular point in time
@param Locale $locale
@param string $formatLength One of DatesReader FORMAT_LENGTH constants
@return string Formatted date
@api
Formats date with format string for date defined in CLDR for particular locale .