code: public static Date calculatePastDate(int days) {
          final Calendar cal = Calendar.getInstance();
          cal.add(Calendar.DATE, -days);
  
          return cal.getTime();
      }
docs: Returns date in history: Today - the given number of days
  
  @param days number of days
  
  @return date object that lives n days in the past