<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Format a time interval with the requested granularity</title>
	<atom:link href="http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/</link>
	<description>Simple is better than complex. Complex is better than complicated. &#124; @fedecarg</description>
	<lastBuildDate>Mon, 08 Mar 2010 06:09:25 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Federico</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4400</link>
		<dc:creator>Federico</dc:creator>
		<pubDate>Mon, 29 Jun 2009 18:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4400</guid>
		<description>Indeed, a year may contain one or more extra days. I guess for those who want more precision, then yes, it is important to take the leap year into consideration.

Thanks.</description>
		<content:encoded><![CDATA[<p>Indeed, a year may contain one or more extra days. I guess for those who want more precision, then yes, it is important to take the leap year into consideration.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerard Klomp</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4396</link>
		<dc:creator>Gerard Klomp</dc:creator>
		<pubDate>Mon, 29 Jun 2009 11:15:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4396</guid>
		<description>I really liked the idea you had, but for my purpose I had to change your class a bit. The first thing I changed was added support for PHP DateTime, including DateTimeZone so that the current date is compared correctly, I also changed the method so that a string with the current date can be passed (as Nzsz already mentioned).

The second thing I changed was the support for leap years. Currently your class does not support those years and will generate an incorrect day/.. count for years &lt; 2008.

The other stuff is mostly for viewing pleasure, and to replace the names used.

http://www.pastebin.be/19456</description>
		<content:encoded><![CDATA[<p>I really liked the idea you had, but for my purpose I had to change your class a bit. The first thing I changed was added support for PHP DateTime, including DateTimeZone so that the current date is compared correctly, I also changed the method so that a string with the current date can be passed (as Nzsz already mentioned).</p>
<p>The second thing I changed was the support for leap years. Currently your class does not support those years and will generate an incorrect day/.. count for years &lt; 2008.</p>
<p>The other stuff is mostly for viewing pleasure, and to replace the names used.</p>
<p><a href="http://www.pastebin.be/19456" rel="nofollow">http://www.pastebin.be/19456</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nzsz</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4395</link>
		<dc:creator>Nzsz</dc:creator>
		<pubDate>Sun, 28 Jun 2009 20:38:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4395</guid>
		<description>You should do something with the explode(&#039;&#124;&#039;, $key) because it will done every time the function is called =&gt; If i call it 10 times the explode will be called 10 times per unit =&gt; 60 times! (perhaps hardcoded as a static array of class or function

Also I would prefer the use of a static method, that would also speed the class up

and last but not least i think i would prefer the strtotime-function inside of the getInterval-function so i don&#039;t have to call it every time and save some annoying tipping ;)</description>
		<content:encoded><![CDATA[<p>You should do something with the explode(&#8216;|&#8217;, $key) because it will done every time the function is called =&gt; If i call it 10 times the explode will be called 10 times per unit =&gt; 60 times! (perhaps hardcoded as a static array of class or function</p>
<p>Also I would prefer the use of a static method, that would also speed the class up</p>
<p>and last but not least i think i would prefer the strtotime-function inside of the getInterval-function so i don&#8217;t have to call it every time and save some annoying tipping ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DreamNest</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4388</link>
		<dc:creator>DreamNest</dc:creator>
		<pubDate>Fri, 26 Jun 2009 13:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4388</guid>
		<description>[...] Cargnelutti has posted a class (DateIntervalFormat) that gives you the difference between a date and &#8220;now&#8221; in words [...]</description>
		<content:encoded><![CDATA[<p>[...] Cargnelutti has posted a class (DateIntervalFormat) that gives you the difference between a date and &#8220;now&#8221; in words [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Federico</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4385</link>
		<dc:creator>Federico</dc:creator>
		<pubDate>Thu, 25 Jun 2009 22:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4385</guid>
		<description>Static? Why?</description>
		<content:encoded><![CDATA[<p>Static? Why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BigTrucK</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4384</link>
		<dc:creator>BigTrucK</dc:creator>
		<pubDate>Thu, 25 Jun 2009 20:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4384</guid>
		<description>Nice. Although I would have made the function static.</description>
		<content:encoded><![CDATA[<p>Nice. Although I would have made the function static.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Webs Developer</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4383</link>
		<dc:creator>Webs Developer</dc:creator>
		<pubDate>Thu, 25 Jun 2009 18:03:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4383</guid>
		<description>[...] Cargnelutti has posted a class (DateIntervalFormat) that gives you the difference between a date and &#8220;now&#8221; in words [...]</description>
		<content:encoded><![CDATA[<p>[...] Cargnelutti has posted a class (DateIntervalFormat) that gives you the difference between a date and &#8220;now&#8221; in words [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jasper</title>
		<link>http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/#comment-4381</link>
		<dc:creator>Jasper</dc:creator>
		<pubDate>Thu, 25 Jun 2009 07:26:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fedecarg.com/?p=1691#comment-4381</guid>
		<description>Cool. I wrote something similar to this a couple of weeks ago. The only differences being that the words for &quot;day&quot;, &quot;month&quot;, &quot;year&quot; etc were set as class properties so you could set externally and you could also set the date that you&#039;re using as time() so you could measure betweek 2 specific dates if you wanted to.

I&#039;d like to implement something for MySQL timestamps as well - I don&#039;t really trust unix ones.</description>
		<content:encoded><![CDATA[<p>Cool. I wrote something similar to this a couple of weeks ago. The only differences being that the words for &#8220;day&#8221;, &#8220;month&#8221;, &#8220;year&#8221; etc were set as class properties so you could set externally and you could also set the date that you&#8217;re using as time() so you could measure betweek 2 specific dates if you wanted to.</p>
<p>I&#8217;d like to implement something for MySQL timestamps as well &#8211; I don&#8217;t really trust unix ones.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
