code: public String getFormattedDate(String format) {
          SimpleDateFormat dateFormat = new SimpleDateFormat(format);
          return dateFormat.format(date);
      }
docs: Formats the date of the event with the given format
  
  @param format the format
  @return the formatted date