Neos\Flow\I18n\Formatter\DatetimeFormatter::formatDate PHP Метод

formatDate() публичный Метод

Formats date with format string for date defined in CLDR for particular locale.
public formatDate ( DateTimeInterface $date, Locale $locale, string $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT ) : string
$date DateTimeInterface PHP object representing particular point in time
$locale Neos\Flow\I18n\Locale
$formatLength string One of DatesReader FORMAT_LENGTH constants
Результат string Formatted date
    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));
    }