[ANN] Ruby Month 0.1.0

From out of murky depths of the Lafcadio codebase, I bring you a tiny utility library called Ruby Month. It's a modest thing, intended to make month-level manipulations easier.

http://rubyforge.org/projects/month

For example:

require 'month'
jun2005 = Month.new( 2005, 6 )
jun2005.to_s # => "Jun 2005"
jun2005.start_date.to_s # => "2005-06-01"
jun2005.end_date.to_s # => "2005-06-30"

jul2005 = jun2005.next
jul2005.to_s # => "Jul 2005"
may2005 = jun2005.prev
may2005.to_s # => "May 2005"

to_sort = [ jul2005, may2005, jun2005 ]
to_sort.join ', ' # => "Jul 2005, May 2005, Jun 2005"
to_sort.sort!
to_sort.join ', ' # => "May 2005, Jun 2005, Jul 2005"

Hope you find it useful!

Francis Hwang
http://fhwang.net/

Awesome! I'm sure I will. Thanks.

ยทยทยท

On 6/7/05, Francis Hwang <sera@fhwang.net> wrote:

From out of murky depths of the Lafcadio codebase, I bring you a tiny
utility library called Ruby Month. It's a modest thing, intended to
make month-level manipulations easier.

Hope you find it useful!

--
Regards,
John Wilger

-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland