code: @Override
    public void format(
        ZonedDateTime start, ZonedDateTime end, DateTimeIntervalSkeleton skeleton, StringBuilder buffer) {
      
      DateTimeField field = CalendarFormattingUtils.greatestDifference(start, end);
      if (skeleton == null) {
        switch (field) {
          case YEAR:
          case MONTH:
          case DAY:
            skeleton = DateTimeIntervalSkeleton.yMMMd;
            break;
          
          default:
            skeleton = DateTimeIntervalSkeleton.hmv;
            break;
        }
      }
      formatInterval(start, end, skeleton.skeleton(), field, buffer);
    }
docs: Format a date time interval, guessing at the best skeleton to use based on the field
  of greatest difference between the start and end date-time.  If the end date-time has
  a different time zone than the start, this is corrected for comparison. If the
  skeleton is null, one is selected automatically using the field of greatest difference.
  
  Greatest difference is calculated by comparing fields in the following order:
  
  year, month, date, day-of-week, am-pm, hour, hour-of-day, minute, and second