src/DayOfWeek.php
public static function of(int $dayOfWeek) : DayOfWeek
    {
        Field\DayOfWeek::check($dayOfWeek);

        return DayOfWeek::get($dayOfWeek);
    }
public static function of(int $dayOfWeek) : DayOfWeek
    {
        Field\DayOfWeek::check($dayOfWeek);

        return DayOfWeek::get($dayOfWeek);
    }
public static function of ( int $ dayOfWeek ) : DayOfWeek { Field \ DayOfWeek :: check ( $ dayOfWeek ) ; return DayOfWeek :: get ( $ dayOfWeek ) ; }
Returns an instance of DayOfWeek for the given day-of-week value.

@param int $dayOfWeek The day-of-week value, from 1 (Monday) to 7 (Sunday).

@return DayOfWeek The DayOfWeek instance.

@throws DateTimeException If the day-of-week is not valid.
Returns an instance of DayOfWeek for the given day - of - week value .