Algorithm for "1st Tuesday", "last Saturday", etc.



Can someone point me to an algorithm that, given a speific month and year,
can convert "dates" such as "1st Tuesday", "last Saturday", etc. to actual
numeric dates.

I've tried a (DOS-based) executable called "DATES.EXE", but it doesn't
handle "even" and "odd" years (which I use for tax purposes) so I wrote
a PRE-processor, and I don't like its output format so I wrote a POST-
processor. If I could find the appropriate algorithm as described agove,
it would probably just be easier to write one program!
--
--Myron A. Calhoun.
Five boxes preserve our freedoms: soap, ballot, witness, jury, and cartridge
PhD EE (retired). "Barbershop" tenor. CDL(PTXS). W0PBV. (785) 539-4448
NRA Life Member and Certified Instructor (Home Firearm Safety, Rifle, Pistol)
.