code: static JulianDate ofYearDay(int prolepticYear, int dayOfYear) {
          JulianChronology.YEAR_RANGE.checkValidValue(prolepticYear, YEAR);
          DAY_OF_YEAR.checkValidValue(dayOfYear);
          boolean leap = JulianChronology.INSTANCE.isLeapYear(prolepticYear);
          if (dayOfYear == 366 && leap == false) {
              throw new DateTimeException("Invalid date 'DayOfYear 366' as '" + prolepticYear + "' is not a leap year");
          }
          Month moy = Month.of((dayOfYear - 1) / 31 + 1);
          int monthEnd = moy.firstDayOfYear(leap) + moy.length(leap) - 1;
          if (dayOfYear > monthEnd) {
              moy = moy.plus(1);
          }
          int dom = dayOfYear - moy.firstDayOfYear(leap) + 1;
          return new JulianDate(prolepticYear, moy.getValue(), dom);
      }
docs: Obtains a {@code JulianDate} representing a date in the Julian calendar
  system from the proleptic-year and day-of-year fields.
  <p>
  This returns a {@code JulianDate} with the specified fields.
  The day must be valid for the year, otherwise an exception will be thrown.
  
  @param prolepticYear  the Julian proleptic-year
  @param dayOfYear  the Julian day-of-year, from 1 to 366
  @return the date in Julian 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