public function getDayName($day = null)
    {
        if ($day === null) {
            $day = $this->getDay();
        }
        if ($day <= 0) {
            $day += count($this->dayNames);
        }

        $idx = $day - 1;

        return $this->dayNames[$idx];
    }
public function getDayName($day = null)
    {
        if ($day === null) {
            $day = $this->getDay();
        }
        if ($day <= 0) {
            $day += count($this->dayNames);
        }

        $idx = $day - 1;

        return $this->dayNames[$idx];
    }
public function getDayName ( $ day = null ) { if ( $ day === null ) { $ day = $ this -> getDay ( ) ; } if ( $ day <= 0 ) { $ day += count ( $ this -> dayNames ) ; } $ idx = $ day - 1 ; return $ this -> dayNames [ $ idx ] ; }
Return day name

@param int $day

@return string
Return day name