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

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

Formats time with format string for time defined in CLDR for particular locale.
public formatTime ( DateTimeInterface $time, Locale $locale, string $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT ) : string
$time DateTimeInterface PHP object representing particular point in time
$locale Neos\Flow\I18n\Locale
$formatLength string One of DatesReader FORMAT_LENGTH constants
Результат string Formatted time
    public function formatTime(\DateTimeInterface $time, Locale $locale, $formatLength = DatesReader::FORMAT_LENGTH_DEFAULT)
    {
        DatesReader::validateFormatLength($formatLength);
        return $this->doFormattingWithParsedFormat($time, $this->datesReader->parseFormatFromCldr($locale, DatesReader::FORMAT_TYPE_TIME, $formatLength), $this->datesReader->getLocalizedLiteralsForLocale($locale));
    }