src/YearWeek.php
public static function of(int $year, int $week) : YearWeek
    {
        Field\Year::check($year);
        Field\WeekOfYear::check($week, $year);

        return new YearWeek($year, $week);
    }
public static function of(int $year, int $week) : YearWeek
    {
        Field\Year::check($year);
        Field\WeekOfYear::check($week, $year);

        return new YearWeek($year, $week);
    }
public static function of ( int $ year , int $ week ) : YearWeek { Field \ Year :: check ( $ year ) ; Field \ WeekOfYear :: check ( $ week , $ year ) ; return new YearWeek ( $ year , $ week ) ; }
Obtains an instance of `YearWeek` from a year and week number.

@param int $year The year, from MIN_YEAR to MAX_YEAR.
@param int $week The week number, from 1 to 53.

@return YearWeek

@throws DateTimeException
Obtains an instance of YearWeek from a year and week number .