Just come across this problem, which I think looks like a bug with the version of PHP that is running our server (PHP 4.4.2).
Code: Select all
echo date("Y-m-d", strtotime("Monday -1 week"));2006-10-29
Which is incorrect - the 29th was Sunday. If I run the above code on another server which is running PHP5, it works correctly and returns;
2006-10-30
I read that there are some bugs that might cause this to happen in earlier versions of PHP - couldn't find a simple workaround though. Any ideas?