code: private <B extends Appendable> B applyRules(final Calendar calendar, final B buf) {
          try {
              for (final Rule rule : mRules) {
                  rule.appendTo(buf, calendar);
              }
          } catch (final IOException ioe) {
              ExceptionUtils.rethrow(ioe);
          }
          return buf;
      }
docs: <p>Performs the formatting by applying the rules to the
  specified calendar.</p>
  
  @param calendar  the calendar to format
  @param buf  the buffer to format into
  @param <B> the Appendable class type, usually StringBuilder or StringBuffer.
  @return the specified string buffer