code: private static long yearToGregorianEpochDay(int prolepticYear) {
  
          int cycleNumber = (prolepticYear - 1) / 30; // 0-based.
          int yearInCycle = (prolepticYear - 1) % 30; // 0-based.
  
          int dayInCycle = getAdjustedCycle(cycleNumber)[Math.abs(yearInCycle)]
                  .intValue();
  
          if (yearInCycle < 0) {
              dayInCycle = -dayInCycle;
          }
  
          Long cycleDays;
  
          try {
              cycleDays = ADJUSTED_CYCLES[cycleNumber];
          } catch (ArrayIndexOutOfBoundsException e) {
              cycleDays = null;
          }
  
          if (cycleDays == null) {
              cycleDays = Long.valueOf(cycleNumber * 10631);
          }
  
          return (cycleDays.longValue() + dayInCycle + HIJRAH_JAN_1_1_GREGORIAN_DAY - 1);
      }
docs: Returns the Gregorian epoch day from the proleptic year
  @param prolepticYear the proleptic year
  @return the Epoch day