Topic: converting days to hours

Hi all,

Is it possible to convert days to hours. 
I know I can do it that way: 30 x 24 ,but is there a nicer function like 30.days.hours.

thanks,

Re: converting days to hours

I don't think so...

By the way, its rails question, not ruby. I think days method is rails extension.
And you know you can list all the methods of an object by calling methods method?

Re: converting days to hours

Not really, although you can do maths on durations, for example:

30.days / 1.hour
=> 720

Which I guess is a little more expressive that 30x24

As bluesman.alex says these are Rails extensions rather than part of standard Ruby.

Rob Anderton
TheWebFellas