public static function from(DateTimeParseResult $result) : YearMonthRange
    {
        $start = YearMonth::from($result);

        if ($result->hasField(Field\Year::NAME)) {
            $end = YearMonth::from($result);
        } else {
            $end = $start->withMonth((int) $result->getField(Field\MonthOfYear::NAME));
        }

        return YearMonthRange::of($start, $end);
    }