Are you asking for a routine to deterime the n occurnace of a day of the year.
4th Sat, 21st Mon, 17 Tues, … ?
If so, determine day of week for Jan 1st of the requester year.
If day of week does not equal the day of week your looking for (1st is a Tues an you are looking for Fri), add x days to this date. where x is the differential. In the above case it would be 3 (Wed, Thur, Fri).
Now multiple n * 7 and add that number of days to your result date from above.
That would give you what you want.