I created some nice work week-related functions in PHP that will calculate and return the next available work day, based on any particular date and number days from that date. These were helpful for me in scheduling,appointments, or deadlines for users and clients that are open only Monday-Friday for a 5 day work week. Get a date!
Date-related PHP can be one of the more… frustrating aspects of scripting. Whereas match calculations are the same no matter when or where you perform them, date calculations might appear to work properly in development and then fail later when you aren’t looking. Don’t forget your timezones!