Date math again...

Kenneth Brody kenbrody at bestweb.net
Wed Jan 4 18:16:40 PST 2006


Quoting Bob Stockler (Wed, 4 Jan 2006 20:57:29 -0500):
[...]
> I've been playing with it a bit myself, and think that a lookup
> to a holidays file would be more expensive that a gosub to a
> subroutine (every date checked that is not a Sat or Sun would
> require a lookup, and require maintaining two different files).

No, it wouldn't.  There is no need to check each individual date to
see if it's a holiday.  Simply do a "-ng" lookup on the start date,
and do a getnext loop until EOF or the date is after the end date.
All non-weekend hits are subtracted from the count.

[...]

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list