func IsAfterFirBusDay LPARAMETERS indate LOCAL lRetVal,dayofmonth,l_offday IF !USED("Holiday) USE n:\foxprow\holiday order date IN 0 ELSE SELECT HOLIDAY ENDI *start out with the first day of month dayofmonth = indate - DAY(indate)+1 l_offday = .t. DO WHILE l_offday IF BETWEEN(DOW(dayofmonth),2,6) * passes 1st test -- mon thru fri IF !SEEK(dayofmonth) * passes 2nd test -- not in the holiday table l_offday = .f. else * it is a holiday -- don't change l_offday IF !trade * wait a minute -- it is in holiday table but we trade on that day l_offday = .f. ENDIF ENDIF ENDIF IF l_offday * it was a non working day -- check the next dayofmonth = dayofmonth + 1 endi ENDDO USE IN SELECT("holiday") * if orig date is after the first business day retu .t. RETURN indate > dayofmonth