code: public static String getDate(Date date, int format, Locale locale) {
  
          DateFormat df = DateFormat.getDateInstance(format, locale);
          return df.format(date);
      }
docs: Returns a formated date String from a Date value,
  the formatting based on the provided options.<p>
  
  @param date the Date object to format as String
  @param format the format to use, see {@link DateFormat} for possible values
  @param locale the locale to use
  @return the formatted date