private static int doGetDaysBetween(Date date1, Date date2, Predicate<Calendar> dayFilter) {

		Date d1 = date1;
		Date d2 = date2;
		if (date1.compareTo(date2) > 0) {
			d1 = date2;
			d2 = date1;
		}

		d1 = normalizeDate(d1);
		d2 = normalizeDate(d2);

		Calendar cal = new GregorianCalendar();
		cal.setTime(d1);
		int days = 0;
		while (cal.getTime().compareTo(d2) < 0) {
			cal.add(Calendar.DAY_OF_MONTH, 1);
			if (dayFilter.test(cal)) {
				days++;
			}
		}
		return days;
	}
Returns the <b>business days</b> between the two dates.  Returns 0 if the same date is
passed for both parameters.  The order of the dates does not matter.

@param date1 the first date
@param date2 the second date
@return the number of days
Ghidra/Framework/Generic/src/main/java/ghidra/util/DateUtils.java