src/Carbon/Traits/Comparison.php
public function isDayOfWeek($dayOfWeek)
    {
        if (is_string($dayOfWeek) && defined($constant = static::class.'::'.strtoupper($dayOfWeek))) {
            $dayOfWeek = constant($constant);
        }

        return $this->dayOfWeek === $dayOfWeek;
    }
public function isDayOfWeek($dayOfWeek)
    {
        if (is_string($dayOfWeek) && defined($constant = static::class.'::'.strtoupper($dayOfWeek))) {
            $dayOfWeek = constant($constant);
        }

        return $this->dayOfWeek === $dayOfWeek;
    }
public function isDayOfWeek ( $ dayOfWeek ) { if ( is_string ( $ dayOfWeek ) && defined ( $ constant = static :: class . '::' . strtoupper ( $ dayOfWeek ) ) ) { $ dayOfWeek = constant ( $ constant ) ; } return $ this -> dayOfWeek === $ dayOfWeek ; }
Checks if this day is a specific day of the week.

@param int $dayOfWeek

@return bool
Checks if this day is a specific day of the week .