code: public void setDayFormatter(DayFormatter formatter) {
      this.contentDescriptionFormatter = contentDescriptionFormatter == this.formatter ?
                                         formatter : contentDescriptionFormatter;
      this.formatter = formatter == null ? DayFormatter.DEFAULT : formatter;
      CharSequence currentLabel = getText();
      Object[] spans = null;
      if (currentLabel instanceof Spanned) {
        spans = ((Spanned) currentLabel).getSpans(0, currentLabel.length(), Object.class);
      }
      SpannableString newLabel = new SpannableString(getLabel());
      if (spans != null) {
        for (Object span : spans) {
          newLabel.setSpan(span, 0, newLabel.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        }
      }
      setText(newLabel);
    }
docs: Set the new label formatter and reformat the current label. This preserves current spans.
  
  @param formatter new label formatter