November 17th, 2009, 09:16 AM
Has the same effect as
On top of that, it seems (from the absolutely minimal amount of information you provide) that you wish to manage time through string manipulation. Ruby has a very
rich set of time functionalities wrapped up in the Time
object. Consider the following:
t = Time.now # => Tue Nov 17 10:11:18 -0500 2009
# wait a bit
u = Time.now # => Tue Nov 17 10:11:54 -0500 2009
u - t # => 35.672565
(u - t).to_s # => "35.672565"
You can use TIme objects as 'first-class' objects so to speak; they can be added, subtracted, etc...
True happiness is not getting what you want, it's wanting what you've already got.