<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 06 Jul 2008 17:19:22 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[ThinkPHP Blog: Put out the age of a date in words]]></title>
      <guid>http://www.phpdeveloper.org/news/9957</guid>
      <link>http://www.phpdeveloper.org/news/9957</link>
      <description><![CDATA[<p>
On the ThinkPHP blog today, <i>Annika Rabea</i> <a href="http://blog.thinkphp.de/archives/317-Put-out-the-age-of-a-date-in-words.html">shares a method</a> for outputting dates in words rather than in the usual numbers most applications use.
</p>
<blockquote>
Recently, I have to output the age of a date in words and didn't have a framework to work with. The first steps were to parse the given date into an array and create a timestamp with the individual parts. The difference between the timestamp of now and the created timestamp yielded the age in seconds. The result can be used to compare with seconds of a day, week, etc. 
</blockquote>
<p>
The code snippet <a href="http://blog.thinkphp.de/archives/317-Put-out-the-age-of-a-date-in-words.html">in the post</a> outputs the difference between two timestamps (then and now) it a bit more friendly way (ex. 4 months, 2 weeks, 2 days).
</p>]]></description>
      <pubDate>Fri, 11 Apr 2008 10:37:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Tutorials Blog: Calculating date difference more precisely in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/9774</guid>
      <link>http://www.phpdeveloper.org/news/9774</link>
      <description><![CDATA[<p>
<i>Hasin Hayder</i> has posted <a href="http://www.developertutorials.com/blog/php/calculating-date-difference-more-precisely-in-php-71/">his own response</a> to a recent "relative time" article (showing users things like "received 2 days and 3 hours ago") with a more precise method for doing something similar:
</p>
<blockquote>
This function is production ready and you can use it in any of your application which mainly works with these date difference. I have found it somewhere in web, just forgot the source. Thanks to the unknown author of this excellent function.
</blockquote>
<p>
The rest of <a href="http://www.developertutorials.com/blog/php/calculating-date-difference-more-precisely-in-php-71/">the post</a> is the function itself that takes in the interval string (formatting), the start date, end date and whether to use timestamps or not.
</p>]]></description>
      <pubDate>Tue, 11 Mar 2008 08:40:00 -0500</pubDate>
    </item>
  </channel>
</rss>
