Date and Time in Ruby

First post of the new year, so I think it would be good to revisit one of the most commonly used classes in Ruby, the Date and Time classes.

DATE

The Date class in Ruby does not have any concept of any variables relating to time (Hour, Minutes, Seconds). Simply put, it will only show the Year, Month, and Day values of any given date. To use the date class we simply use require ‘date’. Continue reading