title: php get date a week ago
body: <p>I'm trying to create a selector for elements that are within a week old. i get a timestamp like this <code>Sun, 02 Jun 2013 22:05:00 GMT</code> but the selector should not be affected by time</p>
  
  <p>E.G.</p>
  
  <pre><code>&lt;?
  
  $curdate = date( 'D, d M Y H:I:s' );
  $olddate = "Sun, 02 Jun 2013 22:05:00 GMT";
  
  if($curdate &lt; $olddate){
      // Date is with in a week
  } else {
      // Date is older then a week
  }
  </code></pre>
  
  <p>But in this case, it should not be affected by the time online by the day. But i can't get it working...</p>