I wish to get a PHP date for three working days ago.
I've found numerous examples for getting dates by all sorts of textual methods, but the closest I found was this one, but it returns three dates (not one date, three days ago) and requires a get_holidays function for which the code was not provided.
How can I write the PHP code to return three working days before today?
This works, but doesn't account for week/weekend days:
date('Y-m-d', strtotime('-3 days')); // returns 2012-12-01
This doesn't work, but is what I would like to see:
date('Y-m-d', strtotime('four week days ago'));
In fact, the above returns '1969-12-31'. As does this: strtotime('-4 week days')
.