<?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>Thu, 20 Nov 2008 02:15:50 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Developer Tutorials Blog: Give Your Visitors a Relative Time]]></title>
      <guid>http://www.phpdeveloper.org/news/9759</guid>
      <link>http://www.phpdeveloper.org/news/9759</link>
      <description><![CDATA[<p>
Following on the heels of <A href="http://www.phpdeveloper.org/news/9744">this post</a> to the SitePoint blog (about "roughtime"), <i>Akash Mehta</i> has posted <a href="http://www.developertutorials.com/blog/php/give-your-visitors-relative-time-php-69/">his own version</a> of providing users with something a little different - relative time.
</p>
<blockquote>
I understood the merits of the approach, but it struck me that a relative time might be a little more useful for many situations. For example, in a fast moving discussion, a short timestamp (e.g. 8:30 AM) as well as a verbal summary of how long ago the time was (e.g. "4 hours ago", "20 minutes ago") are most useful to the user. [...] Now, I figured this could be achieved very easily in PHP - and it could.
</blockquote>
<p>
His code <a href="http://www.developertutorials.com/blog/php/give-your-visitors-relative-time-php-69/">is included</a> showing a series of if/else comparisons that change the values to their hour/minute/second counterparts. He also recommends the <a href="http://pear.php.net/package-info.php?package=Numbers_Words">PEAR Numbers_Words package to help with readability.
</p>]]></description>
      <pubDate>Fri, 07 Mar 2008 11:19:00 -0600</pubDate>
    </item>
  </channel>
</rss>
