/**
   * Gets the date of when the note was edited.
   *
   * @param flag
   * @return The date of the note waas edited.
   */
  private String getNoteDate(int flag, int ID) {
    String dateString = "";
    Calendar date = null;
    if (flag == 1) {
      date = manager.getRestockerDate(ID);

    } else {
      date = manager.getMarketingDate(ID);
    }

    if (date == null) {
      return "no date"; // needed when no note is written yet
    }
    int day = date.get(Calendar.DATE);
    int month = date.get(Calendar.MONTH);
    int year = date.get(Calendar.YEAR);
    String monthString = new DateFormatSymbols().getMonths()[month];
    dateString += monthString + " " + day + ", " + year;
    return dateString;
  }