Adding times

EB wrote:

Is there an easy way to add specific hours and minutes to a
given time? I have a feeling this is easy to do, I just don't
know how.

I'm not sure I understand exactly what you're trying to do, but something like this:

class Fixnum
  def minutes
   self*60
  end
  def hours
   self*3600
  end
end

Time.now + 7.minutes
x = Time.now
x += 13.hours + 17.minutes

Something like this can be found in Facets too.

···

--
  Ola Bini (http://ola-bini.blogspot.com)
  JvYAML, RbYAML, JRuby and Jatha contributor
  System Developer, Karolinska Institutet (http://www.ki.se)
  OLogix Consulting (http://www.ologix.com)

  "Yields falsehood when quined" yields falsehood when quined.