From: `brad` Date: 2008-06-04T13:04:18+09:00 Subject: Re: Commercial Calendar Calculations you could try something like this......very rough pseudo code, but the logic should be there def checkworkday(datechecked) day = datechecked while day == holiday && day == dayoff day = nextday end return day; end dayneeded=firstdayofmonth nomberofworkdays.times {dayneeded = checkworkday(dayneeded)} xdayofworkthismonth = dayneeded