I want to get the PHP date within three business days ago.
I found many examples of getting dates with all kinds of text methods, but the closest I found this one , but it returns three dates (not one date, three days ago) and requires the get_holidays function, for which the code was not provided.
How can I write PHP code that will be returned three business days before today?
This works, but does not take into account the days of the week / days off:
date('Ym-d', strtotime('-3 days'));
This does not work, but this is what I would like to see:
date('Ym-d', strtotime('four week days ago'));
Actually the above returns "1969-12-31". How to do it: strtotime('-4 week days') .
source share