code: private static int getDayOfYear(int cycleNumber, int dayOfCycle, int yearInCycle) {
          Integer[] cycles = getAdjustedCycle(cycleNumber);
  
          if (dayOfCycle > 0) {
              return dayOfCycle - cycles[yearInCycle].intValue();
          } else {
              return cycles[yearInCycle].intValue() + dayOfCycle;
          }
      }
docs: Returns day-of-year.
  
  @param cycleNumber  a cycle number
  @param dayOfCycle  day of cycle
  @param yearInCycle  year in cycle
  @return day-of-year