title: PHP Date Bug When Using Code with Translated Dates
body: <p>Yet another PHP date question for everyone - I have the current code for an English version of my site which works perfectly:</p>
  
  <pre><code>$article = &amp;$articles[$i];
  
  if($currentdate != date("F Y", strtotime($article-&gt;getDate()))) {   
      $currentdate = date("F Y", strtotime($article-&gt;getDate()));                 
      $current_content1 .= "&lt;div class='press-articles-heading'&gt;" . $currentdate . "    &lt;/div&gt;";
  }   
  </code></pre>
  
  <p>Basically what this does is pulls records from a db and compares the date so that the month header is only displayed once, e.g. July 2012 and then all the records for the month, and then June 2012 etc.</p>
  
  <p>If I use the same code on a non-English version of a site I get a bug:</p>
  
  <pre><code>$article = &amp;$articles[$i];
  
  if($currentdate != date("F Y", strtotime($article-&gt;getDate()))) {   
      $currentdate = strftime("%B %Y", strtotime($article-&gt;getDate()));                 
      $current_content1 .= "&lt;div class='press-articles-heading'&gt;" . $currentdate . "&lt;/div&gt;";
  }   
  </code></pre>
  
  <p>What happens here is I get the month header for every db record despite them being the same.</p>
  
  <p>Can't see where the bug is, has anyone any ideas? </p>
  
  <p>Any help is much appreciated.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I did try a few things before posting the question but thought best to leave it out in order to keep the question simple.</p>
  
  <p>I did try the following:</p>
  
  <pre><code>$article = &amp;$articles[$i];
  
  if($currentdate != date("F Y", strtotime($article-&gt;getDate()))) {   
      $translated_date = strftime("%B %Y", strtotime($article-&gt;getDate()));                 
      $current_content1 .= "&lt;div class='press-articles-heading'&gt;" . $translated_date . "&lt;/div&gt;";
  }
  </code></pre>
  
  <p>But that didn't solve it</p>