code: public static String formatRFC822Date(Date date) {
          try {
              return rfc822DateFormat.print(date.getTime());
          } catch(RuntimeException ex) {
              throw handleException(ex);
          }
      }
docs: Formats the specified date as an RFC 822 string.
  
  @param date
  The date to format.
  
  @return The RFC 822 string representing the specified date.