* @param MV_returnarray
   * @return int
   */
  public static int computeCalendarDate(int julianDay, Object [] MV_returnarray) {
    { int ja = julianDay;
      int jalpha = 0;
      int jb = 0;
      int jc = 0;
      int jd = 0;
      int je = 0;
      int igreg = 2299161;
      int yyyy = 0;
      int mm = 0;
      int dd = 0;

      if (julianDay >= igreg) {
        jalpha = ((int)(((julianDay - 1867216) - 0.25) / 36524.25));
        ja = julianDay + 1 + jalpha + ((int)(-0.25 * jalpha));
      }
      jb = ja + 1524;
      jc = ((int)(6680.0 + (((jb - 2439870) - 122.1) / 365.25)));
      jd = ((int)((365 * jc) + (0.25 * jc)));
      je = ((int)((jb - jd) / 30.6001));
      dd = (jb - jd) - ((int)(30.6001 * je));
      mm = je - 1;
      if (mm > 12) {
        mm = mm - 12;
      }
      yyyy = jc - 4715;
      if (mm > 2) {
        yyyy = yyyy - 1;
      }
      if (yyyy <= 0) {
        yyyy = yyyy - 1;
      }
      { int _return_temp = yyyy;

        MV_returnarray[0] = IntegerWrapper.wrapInteger(mm);
        MV_returnarray[1] = IntegerWrapper.wrapInteger(dd);
        MV_returnarray[2] = Stella.computeDayOfWeekJulian(julianDay);
        return (_return_temp);
      }
    }
  }