<?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"
	>
<channel>
	<title>Comments on: English-friendly timespan in Rails</title>
	<atom:link href="http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/</link>
	<description>A whole bunch of nought thought by Chris Cummer</description>
	<pubDate>Tue, 06 Jan 2009 21:01:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: chris</title>
		<link>http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/#comment-54</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Thu, 05 Apr 2007 05:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/#comment-54</guid>
		<description>Your as_str() method looks a bit like my first pass at this. The switch case approach - unwieldiness aside - made it a bit tricky to do things like have "and" if minutes were at the end (too many ugly conditions), or add localization (something planned for this version at some point In The Future).

Note that the use of singularize() means this only works in Rails and not with stock Ruby (as singularize() is part of &lt;a href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html" rel="nofollow"&gt;ActiveSupport::CoreExtensions&lt;/a&gt;). A bit more hackery would be required to make it portable.</description>
		<content:encoded><![CDATA[<p>Your as_str() method looks a bit like my first pass at this. The switch case approach - unwieldiness aside - made it a bit tricky to do things like have &#8220;and&#8221; if minutes were at the end (too many ugly conditions), or add localization (something planned for this version at some point In The Future).</p>
<p>Note that the use of singularize() means this only works in Rails and not with stock Ruby (as singularize() is part of <a href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html" rel="nofollow">ActiveSupport::CoreExtensions</a>). A bit more hackery would be required to make it portable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/#comment-53</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Thu, 05 Apr 2007 04:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/#comment-53</guid>
		<description>I hacked something like this up once, too, when I wanted to print event durations in something other than seconds.

http://vpim.rubyforge.org/

see Vpim::Duration

looking at the code now, its totally brute force :-) obviously done in a hurry and never looked at again.</description>
		<content:encoded><![CDATA[<p>I hacked something like this up once, too, when I wanted to print event durations in something other than seconds.</p>
<p><a href="http://vpim.rubyforge.org/" rel="nofollow">http://vpim.rubyforge.org/</a></p>
<p>see Vpim::Duration</p>
<p>looking at the code now, its totally brute force <img src='http://www.postal-code.com/binarycode/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> obviously done in a hurry and never looked at again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
