title: PHP Date Question
body: <p>I am trying to do a little bit of math using dates in PHP. I am modifying a shoutbox, and I want to implement the following functionality.</p>
  
  <hr>
  
  <p>If post date = today, return time of post</p>
  
  <p>else if date = yesterday, return "yesterday"</p>
  
  <p>else date = X days ago</p>
  
  <hr>
  
  <p>How would I use php's date functions to calculate how many days ago a timestamp is (the timestamp is formatted in UNIX time)</p>