code: private int newMoonNear(int days, boolean after) {
          
          astro.setTime(daysToMillis(days));
          long newMoon = astro.getMoonTime(CalendarAstronomer.NEW_MOON, after);
          
          return millisToDays(newMoon);
      }
docs: Return the closest new moon to the given date, searching either
  forward or backward in time.
  @param days days after January 1, 1970 0:00 Asia/Shanghai
  @param after if true, search for a new moon on or after the given
  date; otherwise, search for a new moon before it
  @return days after January 1, 1970 0:00 Asia/Shanghai of the nearest
  new moon after or before <code>days</code>