code: public static String formatDate(final Date value, final String pattern)
      {
          return new SimpleDateFormat(pattern, context.get().getLocale()).format(value);
      }
docs: <p>
  Formats a date according to the given pattern.
  </p>
  
  @param value
  Date to be formatted
  @param pattern
  The pattern. See {@link dateFormatInstance(String)}
  @return a formatted date/time string