public function getOrderPeriodFirstDay($day)
    {

        $currentWeekday = $this->formatAsWeekday($day);
        $dateDiff = 7 - $this->getSendOrderListsWeekday() + $currentWeekday;
        $date = strtotime('-' . $dateDiff . ' day ', $day);

        if ($currentWeekday > $this->getDeliveryWeekday()) {
            $date = strtotime('+7 day', $date);
        }

        $date = date($this->getI18Format('DateShortAlt'), $date);

        return $date;
    }
public function getOrderPeriodFirstDay($day)
    {

        $currentWeekday = $this->formatAsWeekday($day);
        $dateDiff = 7 - $this->getSendOrderListsWeekday() + $currentWeekday;
        $date = strtotime('-' . $dateDiff . ' day ', $day);

        if ($currentWeekday > $this->getDeliveryWeekday()) {
            $date = strtotime('+7 day', $date);
        }

        $date = date($this->getI18Format('DateShortAlt'), $date);

        return $date;
    }
public function getOrderPeriodFirstDay ( $ day ) { $ currentWeekday = $ this -> formatAsWeekday ( $ day ) ; $ dateDiff = 7 - $ this -> getSendOrderListsWeekday ( ) + $ currentWeekday ; $ date = strtotime ( '-' . $ dateDiff . ' day ' , $ day ) ; if ( $ currentWeekday > $ this -> getDeliveryWeekday ( ) ) { $ date = strtotime ( '+7 day' , $ date ) ; } $ date = date ( $ this -> getI18Format ( 'DateShortAlt' ) , $ date ) ; return $ date ; }
see tests for implementations
@param $day
@return $day
see tests for implementations