src/YearMonth.php
public static function of(int $year, int $month) : YearMonth
    {
        Field\Year::check($year);
        Field\MonthOfYear::check($month);

        return new YearMonth($year, $month);
    }
public static function of(int $year, int $month) : YearMonth
    {
        Field\Year::check($year);
        Field\MonthOfYear::check($month);

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

@param int $year  The year, from MIN_YEAR to MAX_YEAR.
@param int $month The month-of-year, from 1 (January) to 12 (December).

@return YearMonth

@throws DateTimeException
Obtains an instance of YearMonth from a year and month .