title: Getting first weekday in a month with strtotime
body: <p>I'm trying to figure out the first wednesday of a given month using <code>strtotime</code>, but the "first wednesday" argument fails whenever the first wednesday happens to fall on the 1st.</p>
  
  <p>For a more general illustration of this problem, see the following code and result:</p>
  
  <pre><code>$mon = strtotime("December 2010 first monday");
  $tue = strtotime("December 2010 first tuesday");
  $wed = strtotime("December 2010 first wednesday");
  $thu = strtotime("December 2010 first thursday");
  $fri = strtotime("December 2010 first friday");
  $sat = strtotime("December 2010 first saturday");
  $sun = strtotime("December 2010 first sunday");
  
  echo strftime("%m/%d/%y", $mon) . "&lt;br&gt;";
  echo strftime("%m/%d/%y", $tue) . "&lt;br&gt;";
  echo strftime("%m/%d/%y", $wed) . "&lt;br&gt;";
  echo strftime("%m/%d/%y", $thu) . "&lt;br&gt;";
  echo strftime("%m/%d/%y", $fri) . "&lt;br&gt;";
  echo strftime("%m/%d/%y", $sat) . "&lt;br&gt;";
  echo strftime("%m/%d/%y", $sun) . "&lt;br&gt;";
  </code></pre>
  
  <p>Results in:</p>
  
  <pre><code>12/06/10
  12/07/10
  12/08/10
  12/02/10
  12/03/10
  12/04/10
  12/05/10
  </code></pre>
  
  <p>Notice something? Shouldn't one day of the week coincide with the 1st of the month?  But it never does, and instead the second instance of the day, on the 8th, is always returned.</p>
  
  <p>Anyone have an explanation for this?</p>