Enumerate a range of dates with Ruby | May 5th, 2008
Quick snippet, having fun with dates.
require 'rubygems'
require 'activesupport'
date_range = (DateTime.now-10.days)..DateTime.now
date_range.each { |e| puts e }
Quick snippet, having fun with dates.
require 'rubygems'
require 'activesupport'
date_range = (DateTime.now-10.days)..DateTime.now
date_range.each { |e| puts e }
This entry was posted on Monday, May 5th, 2008 at 4:14 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
June 26th, 2008 at 3:06 pm
AGAIN this was useful! Thanks for blogging it.