future date, business days only

I’m trying to display certain content based on a few different date variables and can’t seem to wrap my head around the logic using PHP. Any help is much appreciated!

I have a set of table of records, all with a DATE field in the format of Y-m-d. I would like to display only the records that are more than 2 business days away from the current server date. Included also is a list of non-working week days including holidays and other days off that i’ll manually manage in another table since they change every year so I can’t simply exclude weekend days.

For example:
if a record has a date of 2011-01-25 and there is a non-working week day on 2011-01-21 then;
on server date 2011-01-19 the record is displayed
on server date 2011-01-20 the record is not displayed

Thanks again for any help!

Sponsor our Newsletter | Privacy Policy | Terms of Service