code: private int getNextDayOfMonth(int day)
      {
          if (!contains(daysOfMonth, day))
          {
              long higher = higher(daysOfMonth, day);
              if (higher != 0)
              {
                  return first(higher);
              }
  
              return ADVANCE_TO_NEXT_MONTH;
          }
  
          return day;
      }
docs: Returns the next day of the month after <tt>day</tt> that satisfies the
  dayOfMonth constraint.
  
  @param day the current 0-based day of the month
  @return a value greater than or equal to <tt>day</tt>