code: public StringBuffer format(Date date, StringBuffer toAppendTo,
                                       FieldPosition fieldPosition) {
          // Use our Calendar object
          calendar.setTime(date);
          return format(calendar, toAppendTo, fieldPosition);
      }
docs: Formats a Date into a date/time string.
  @param date a Date to be formatted into a date/time string.
  @param toAppendTo the string buffer for the returning date/time string.
  @param fieldPosition keeps track of the position of the field
  within the returned string.
  On input: an alignment field,
  if desired. On output: the offsets of the alignment field. For
  example, given a time text "1996.07.10 AD at 15:08:56 PDT",
  if the given fieldPosition is DateFormat.YEAR_FIELD, the
  begin index and end index of fieldPosition will be set to
  0 and 4, respectively.
  Notice that if the same time field appears
  more than once in a pattern, the fieldPosition will be set for the first
  occurrence of that time field. For instance, formatting a Date to
  the time string "1 PM PDT (Pacific Daylight Time)" using the pattern
  "h a z (zzzz)" and the alignment field DateFormat.TIMEZONE_FIELD,
  the begin index and end index of fieldPosition will be set to
  5 and 8, respectively, for the first occurrence of the timezone
  pattern character 'z'.
  @return the formatted date/time string.