code: public Date getNextDate(final int pSize, final String pPattern, final boolean pUseBcd) {
  		Date date = null;
  		// create date formatter
  		SimpleDateFormat sdf = new SimpleDateFormat(pPattern);
  		// get String
  		String dateTxt = null;
  		if (pUseBcd) {
  			dateTxt = getNextHexaString(pSize);
  		} else {
  			dateTxt = getNextString(pSize);
  		}
  
  		try {
  			date = sdf.parse(dateTxt);
  		} catch (ParseException e) {
  			LOGGER.error("Parsing date error. date:" + dateTxt + " pattern:" + pPattern, e);
  		}
  		return date;
  	}
docs: Method to get the next date
  
  @param pSize
  the size of the string date in bit
  @param pPattern
  the Date pattern
  @param pUseBcd
  get the Date with BCD format (Binary coded decimal)
  @return a date object or null