Time.now creates an instance of class Time that's set to the current time. : now « Time « Ruby






Time.now creates an instance of class Time that's set to the current time.



puts Time.now

 

Related examples in the same category

1.manipulate time objects by adding and subtracting numbers of seconds to them.
2.Finding Today's Date