code: static PaxDate ofYearDay(int prolepticYear, int dayOfYear) {
          YEAR.checkValidValue(prolepticYear);
          PaxChronology.DAY_OF_YEAR_RANGE.checkValidValue(dayOfYear, DAY_OF_YEAR);
          boolean leap = PaxChronology.INSTANCE.isLeapYear(prolepticYear);
          if (dayOfYear > DAYS_IN_YEAR && !leap) {
              throw new DateTimeException("Invalid date 'DayOfYear " + dayOfYear + "' as '" + prolepticYear + "' is not a leap year");
          }
  
          int month = ((dayOfYear - 1) / DAYS_IN_MONTH) + 1;
  
          // In leap years, the leap-month is shorter than the following month, so needs to be adjusted.
          if (leap && month == MONTHS_IN_YEAR && dayOfYear >= (DAYS_IN_YEAR + DAYS_IN_WEEK) - DAYS_IN_MONTH + 1) {
              month++;
          }
  
          // Subtract days-at-start-of-month from days in year
          int dayOfMonth = dayOfYear - (month - 1) * DAYS_IN_MONTH;
  
          // Adjust for shorter inserted leap-month.
          if (month == MONTHS_IN_YEAR + 1) {
              dayOfMonth += (DAYS_IN_MONTH - DAYS_IN_WEEK);
          }
  
          return of(prolepticYear, month, dayOfMonth);
      }
docs: Obtains a {@code PaxDate} representing a date in the Pax calendar
  system from the proleptic-year and day-of-year fields.
  <p>
  This returns a {@code PaxDate} with the specified fields.
  The day must be valid for the year, otherwise an exception will be thrown.
  
  @param prolepticYear  the Pax proleptic-year
  @param dayOfYear  the Pax day-of-year, from 1 to 371
  @return the date in Pax calendar system, not null
  @throws DateTimeException if the value of any field is out of range,
  or if the day-of-year is invalid for the year