code: private boolean hasLeapMonth(long m0, long m) {
          return (
              (m >= m0)
              && (this.hasNoMajorSolarTerm(m) || this.hasLeapMonth(m0, this.newMoonBefore(m)))
          );
      }
docs: is there any leap month between m0 and m?