protected function replaceDatePlaceHolders(DateTime $date, $format)
    {
        $numWeekDay = (int)$date->format('w');
        $numWeekDay = $numWeekDay  == 0 ? 7 : $numWeekDay;
        $numMonth =  $date->format('n');

        // First get the symbols
        $weekDay3 = $this->getSymbol(self::WEEKDAY, "$numWeekDay", self::LONG);
        $weekDay = $this->getSymbol(self::WEEKDAY, "$numWeekDay", self::VERBOSE);
        $month3 = $this->getSymbol(self::MONTH, $numMonth, self::LONG);
        $month = $this->getSymbol(self::MONTH, $numMonth, self::VERBOSE);

        // Escape them to be not be parsed by DateTime
        $weekDay3 = $this->escapeEveryChar($weekDay3);
        $weekDay = $this->escapeEveryChar($weekDay);
        $month3 = $this->escapeEveryChar($month3);
        $month = $this->escapeEveryChar($month);

        // Replace every php date char by the respecting symbol
        return $this->replaceUnEscaped(
            ['D',       'l',      'M',     'F'],
            [$weekDay3, $weekDay, $month3, $month],
            $format
        );

    }
protected function replaceDatePlaceHolders(DateTime $date, $format)
    {
        $numWeekDay = (int)$date->format('w');
        $numWeekDay = $numWeekDay  == 0 ? 7 : $numWeekDay;
        $numMonth =  $date->format('n');

        // First get the symbols
        $weekDay3 = $this->getSymbol(self::WEEKDAY, "$numWeekDay", self::LONG);
        $weekDay = $this->getSymbol(self::WEEKDAY, "$numWeekDay", self::VERBOSE);
        $month3 = $this->getSymbol(self::MONTH, $numMonth, self::LONG);
        $month = $this->getSymbol(self::MONTH, $numMonth, self::VERBOSE);

        // Escape them to be not be parsed by DateTime
        $weekDay3 = $this->escapeEveryChar($weekDay3);
        $weekDay = $this->escapeEveryChar($weekDay);
        $month3 = $this->escapeEveryChar($month3);
        $month = $this->escapeEveryChar($month);

        // Replace every php date char by the respecting symbol
        return $this->replaceUnEscaped(
            ['D',       'l',      'M',     'F'],
            [$weekDay3, $weekDay, $month3, $month],
            $format
        );

    }
protected function replaceDatePlaceHolders ( DateTime $ date , $ format ) { $ numWeekDay = ( int ) $ date -> format ( 'w' ) ; $ numWeekDay = $ numWeekDay == 0 ? 7 : $ numWeekDay ; $ numMonth = $ date -> format ( 'n' ) ; // First get the symbols $ weekDay3 = $ this -> getSymbol ( self :: WEEKDAY , "$numWeekDay" , self :: LONG ) ; $ weekDay = $ this -> getSymbol ( self :: WEEKDAY , "$numWeekDay" , self :: VERBOSE ) ; $ month3 = $ this -> getSymbol ( self :: MONTH , $ numMonth , self :: LONG ) ; $ month = $ this -> getSymbol ( self :: MONTH , $ numMonth , self :: VERBOSE ) ; // Escape them to be not be parsed by DateTime $ weekDay3 = $ this -> escapeEveryChar ( $ weekDay3 ) ; $ weekDay = $ this -> escapeEveryChar ( $ weekDay ) ; $ month3 = $ this -> escapeEveryChar ( $ month3 ) ; $ month = $ this -> escapeEveryChar ( $ month ) ; // Replace every php date char by the respecting symbol return $ this -> replaceUnEscaped ( [ 'D' , 'l' , 'M' , 'F' ] , [ $ weekDay3 , $ weekDay , $ month3 , $ month ] , $ format ) ; }
Parses the weekdays and months inside date or datetime formats.

@param DateTime $date
@param string   $format

@return string
Parses the weekdays and months inside date or datetime formats .