[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Ruby Month 0.1.0

Francis Hwang

6/7/2005 1:50:00 PM

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/proj...

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://f...



2 Answers

John Wilger

6/7/2005 3:21:00 PM

0

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!

Awesome! I'm sure I will. Thanks.

--
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


Lady Azure, Baroness of the North Pole

8/20/2012 7:37:00 AM

0

LIAR!!!!

K Wills wrote:

> On Sat, 18 Aug 2012 23:42:15 -0800, "Lady Azure, Baroness of the North
> Pole" <laddie'o'lugh@gall's.org> wrote:
>
> >K Wills wrote:
> >
> >> On Thu, 16 Aug 2012 21:14:45 -0800, "Lady Azure, Baroness of the North
> >> Pole" <laddie'o'lugh@gall's.org> wrote:
> >> >
> >> >K Wills wrote:
> >> >
> >> >> On Wed, 15 Aug 2012 14:52:41 -0700 (PDT), Greegor
> >> >> <greegor47@gmail.com> wrote:
> >> >>
> >> >> >Lady Azure: I "get" your resentment toward
> >> >> >Christians, but your hatred is reaching the
> >> >> >point of making you crazy, as it has made Moe crazy.
> >> >> >
> >> >>
> >> >> Projection noted.
> >> >>
> >> >> >Blaming puritanical Christians is WRONG in this case.
> >> >> >The AUK'ers and Moe are not Christians.
> >> >> >Kent CLAIMS to be a Christian but that is doubtful.
> >> >>
> >> >> Why would I lie about such?
> >> >
> >> >AMM, jiez, wouldn't know, would I!
> >>
> >> Since my question was directed to Greg, I wouldn't expect you to
> >> know.
> >> While you certainly have the right to reply to any post you read,
> >> answering for Greg in the first person, as you did, is not something a
> >> rational person would do.
> >
> >Using GREG to Insult me in 3rd Person, as you and your Friends so often
> >do, isn't either!
>
> Fortunately, no one has done as you claim.
>
> --
> "I could have been ambassador to Moscow by now. Maybe even Private
> Secretary. Instead, I'm watching a dinosaur trash my office..."