I\'m trying to figure out the first wednesday of a given month using strtotime, but the \"first wednesday\" argument fails whenever the first wednesday happens
Building off the answers provided, one needs to be aware of differences in relative date formatting between php 5.2 and php 5.3.
TEST:
$date1 = strtotime("first wednesday of 2010-12");
$date2 = strtotime("first wednesday 2010-12");
$date3 = strtotime("wednesday 2010-12");
5.2 Results:
1969-12-31
2010-12-08
2010-12-01
5.3 Results:
2010-12-01
2010-12-08
2010-12-01
Therefore only the third method returns correct results across PHP 5 versions.