private static void format(long min,long max,SimpleDateFormat formatter,StringBuffer buf,FieldPosition pos){
  if (min == max) {
    formatter.format(new Date(min),buf,pos);
  }
 else {
    buf.append('[');
    formatter.format(new Date(min),buf,pos);
    buf.append(", ");
    formatter.format(new Date(max),buf,pos);
    buf.append(']');
  }
}

private static void format ( long min , long max , SimpleDateFormat formatter , StringBuffer buf , FieldPosition pos ) { if ( min == max ) { formatter . format ( new Date ( min ) , buf , pos ) ; } else { buf . append ( '[' ) ; formatter . format ( new Date ( min ) , buf , pos ) ; buf . append ( ", " ) ; formatter . format ( new Date ( max ) , buf , pos ) ; buf . append ( ']' ) ; } }
format a min , max time pair .
