Ruby provides a class called Time to handle date and time.
Let's look at how to use the Time class:
Time.now creates an instance of class Time that's set to the current time.
You can manipulate time objects by adding and subtracting numbers of seconds to them.
puts Time.now puts Time.now - 10 puts Time.now + 86400
Here, you print the current time, and then the current time minus 10 seconds, and then the current time with 86,400 seconds (exactly one day) added on.