protected function doFormattingWithParsedFormat(\DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals)
    {
        $formattedDateTime = '';

        foreach ($parsedFormat as $subformat) {
            if (is_array($subformat)) {
                // This is just a simple string we use literally
                $formattedDateTime .= $subformat[0];
            } else {
                $formattedDateTime .= $this->doFormattingForSubpattern($dateTime, $subformat, $localizedLiterals);
            }
        }

        return $formattedDateTime;
    }
protected function doFormattingWithParsedFormat(\DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals)
    {
        $formattedDateTime = '';

        foreach ($parsedFormat as $subformat) {
            if (is_array($subformat)) {
                // This is just a simple string we use literally
                $formattedDateTime .= $subformat[0];
            } else {
                $formattedDateTime .= $this->doFormattingForSubpattern($dateTime, $subformat, $localizedLiterals);
            }
        }

        return $formattedDateTime;
    }
protected function doFormattingWithParsedFormat ( \ DateTimeInterface $ dateTime , array $ parsedFormat , array $ localizedLiterals ) { $ formattedDateTime = '' ; foreach ( $ parsedFormat as $ subformat ) { if ( is_array ( $ subformat ) ) { // This is just a simple string we use literally $ formattedDateTime .= $ subformat [ 0 ] ; } else { $ formattedDateTime .= $ this -> doFormattingForSubpattern ( $ dateTime , $ subformat , $ localizedLiterals ) ; } } return $ formattedDateTime ; }
Formats provided dateTime object.

Format rules defined in $parsedFormat array are used. Localizable literals
are replaced with elements from $localizedLiterals array.

@param \DateTimeInterface $dateTime PHP object representing particular point in time
@param array $parsedFormat An array describing format (as in $parsedFormats property)
@param array $localizedLiterals An array with literals to use (as in $localizedLiterals property)
@return string Formatted date / time
Formats provided dateTime object .