code: public long getMoonTime(double desired, boolean next)
      {
          return timeOfAngle( new AngleFunc() {
                              @Override
                              public double eval() { return getMoonAge(); } },
                              desired,
                              SYNODIC_MONTH,
                              MINUTE_MS,
                              next);
      }
docs: Find the next or previous time at which the Moon's ecliptic
  longitude will have the desired value.
  <p>
  @param desired   The desired longitude.
  @param next      <tt>true</tt> if the next occurrance of the phase
  is desired, <tt>false</tt> for the previous occurrance.
  @hide draft / provisional / internal are hidden on Android