code: private <B extends Appendable> B applyRules(final Calendar calendar, final B buf) {
  		try {
  			for (final Rule rule : this.rules) {
  				rule.appendTo(buf, calendar);
  			}
  		} catch (final IOException e) {
  			throw new DateException(e);
  		}
  		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