docs: private int getNextDayOfWeekInMonth(int day, int lastDay, int dayOfWeek)
      {
          int weekInMonth = day / 7;
  
          for (;;)
          {
              if (contains(daysOfWeekInMonth, weekInMonth * 7 + dayOfWeek))
              {
                  return day;
              }
  
              day++;
              if (day > lastDay)
              {
                  return ADVANCE_TO_NEXT_MONTH;
              }
  
              if ((day % 7) == 0)
              {
                  weekInMonth++;
              }
  
              dayOfWeek = (dayOfWeek + 1) % 7;
          }
      }