<?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/"
		>
<channel>
	<title>Comments on: Ruby Time Functions Rock!!</title>
	<atom:link href="http://blog.thatsuseful.com/2007/02/04/ruby-time-functions-rock/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thatsuseful.com/2007/02/04/ruby-time-functions-rock/</link>
	<description>Life on and off the Rails</description>
	<lastBuildDate>Wed, 20 Aug 2008 17:47:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Mully</title>
		<link>http://blog.thatsuseful.com/2007/02/04/ruby-time-functions-rock/comment-page-1/#comment-462</link>
		<dc:creator>Mully</dc:creator>
		<pubDate>Sun, 04 Feb 2007 05:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/ruby-time-functions-rock#comment-462</guid>
		<description>You may already know this, but you could replace your own array of month abbreviations with the Date module&#039;s ABBR_MONTHNAMES constant...

require &#039;date&#039;
months = Date::ABBR_MONTHNAMES

The first element is &#039;nil&#039;, resulting in the index matching the month numbers (1 = &#039;Jan&#039;, etc.). I frequently work with this array and have found this constant handy.</description>
		<content:encoded><![CDATA[<p>You may already know this, but you could replace your own array of month abbreviations with the Date module&#8217;s ABBR_MONTHNAMES constant&#8230;</p>
<p>require &#8216;date&#8217;<br />
months = Date::ABBR_MONTHNAMES</p>
<p>The first element is &#8216;nil&#8217;, resulting in the index matching the month numbers (1 = &#8216;Jan&#8217;, etc.). I frequently work with this array and have found this constant handy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Rutherford</title>
		<link>http://blog.thatsuseful.com/2007/02/04/ruby-time-functions-rock/comment-page-1/#comment-463</link>
		<dc:creator>Scott Rutherford</dc:creator>
		<pubDate>Sun, 04 Feb 2007 05:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/ruby-time-functions-rock#comment-463</guid>
		<description>Hi Mully, cheers for that. I have to admit I didn&#039;t know, but I do now. That makes it even neater:

&lt;pre&gt;
labels = []
0.upto(5) do &#124;x&#124;
  labels.unshift(Date::ABBR_MONTHNAMES[Time.now.months_ago(x).month])
end
&lt;/pre&gt;

Thanks, Scott.</description>
		<content:encoded><![CDATA[<p>Hi Mully, cheers for that. I have to admit I didn&#8217;t know, but I do now. That makes it even neater:</p>
<p>&lt;pre&gt;<br />
labels = []<br />
0.upto(5) do |x|<br />
  labels.unshift(Date::ABBR_MONTHNAMES[Time.now.months_ago(x).month])<br />
end<br />
&lt;/pre&gt;</p>
<p>Thanks, Scott.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blake</title>
		<link>http://blog.thatsuseful.com/2007/02/04/ruby-time-functions-rock/comment-page-1/#comment-464</link>
		<dc:creator>Blake</dc:creator>
		<pubDate>Sun, 04 Feb 2007 05:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/ruby-time-functions-rock#comment-464</guid>
		<description>http://chronic.rubyforge.org/

I&#039;ve been using this to spice time handling up a bit.  Pretty cool stuff.</description>
		<content:encoded><![CDATA[<p><a href="http://chronic.rubyforge.org/" rel="nofollow">http://chronic.rubyforge.org/</a></p>
<p>I&#8217;ve been using this to spice time handling up a bit.  Pretty cool stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Rutherford</title>
		<link>http://blog.thatsuseful.com/2007/02/04/ruby-time-functions-rock/comment-page-1/#comment-465</link>
		<dc:creator>Scott Rutherford</dc:creator>
		<pubDate>Sun, 04 Feb 2007 05:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/ruby-time-functions-rock#comment-465</guid>
		<description>Hi Blake, Yep I&#039;ve had a little play with chronic, seems to be great with certain stuff (&#039;in an hour&#039;, &#039;yesterday&#039;, etc) but not so good for things like &#039;the first day of next  month&#039;, &#039;the first day of last month&#039;. But still a great idea. I need to use it more to understand how to get the best out of it I think.

Cheers
Scott.</description>
		<content:encoded><![CDATA[<p>Hi Blake, Yep I&#8217;ve had a little play with chronic, seems to be great with certain stuff (&#8216;in an hour&#8217;, &#8216;yesterday&#8217;, etc) but not so good for things like &#8216;the first day of next  month&#8217;, &#8216;the first day of last month&#8217;. But still a great idea. I need to use it more to understand how to get the best out of it I think.</p>
<p>Cheers<br />
Scott.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Kastner</title>
		<link>http://blog.thatsuseful.com/2007/02/04/ruby-time-functions-rock/comment-page-1/#comment-466</link>
		<dc:creator>Erik Kastner</dc:creator>
		<pubDate>Sun, 04 Feb 2007 05:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/ruby-time-functions-rock#comment-466</guid>
		<description>Hey, you are sitting next to me at FoWA. Here&#039;s a more idiomatic way of doing the same thing:
(0..5).collect {&#124;months_ago&#124; Time.now.months_ago(months_ago).strftime(&quot;%b&quot;) }.reverse</description>
		<content:encoded><![CDATA[<p>Hey, you are sitting next to me at FoWA. Here&#8217;s a more idiomatic way of doing the same thing:<br />
(0..5).collect {|months_ago| Time.now.months_ago(months_ago).strftime(&quot;%b&quot;) }.reverse</p>
]]></content:encoded>
	</item>
</channel>
</rss>
