Returning today's date

There are 3 ways to return today's date as show below:

require 'date'

Time.now.to_date  
#=> Date: 2015-12-18 ((2457375j,0s,0n),+0s,2299161j)

Date.today
#=> Date: 2015-12-18 ((2457375j,0s,0n),+0s,2299161j)  

DateTime.now.to_date
#=> Date: 2015-12-18 ((2457375j,0s,0n),+0s,2299161j)

Resources