code: private static int getDayOfCycle(long epochDay, int cycleNumber) {
          Long day;
  
          try {
              day = ADJUSTED_CYCLES[cycleNumber];
          } catch (ArrayIndexOutOfBoundsException e) {
              day = null;
          }
          if (day == null) {
              day = Long.valueOf(cycleNumber * 10631);
          }
          return (int) (epochDay - day.longValue());
      }
docs: Returns day of cycle from the epoch day and cycle number.
  
  @param epochDay  an epoch day
  @param cycleNumber  a cycle number
  @return a day of cycle