fork download
  1. require 'date'
  2. d1 = Date.new(2000, 1, 1)
  3. d2 = Date.new(2010, 1, 1)
  4. p d1.year()
  5. p d2.year()
  6. p Date.today()
  7.  
Success #stdin #stdout 0.01s 7760KB
stdin
Standard input is empty
stdout
2000
2010
#<Date: 2015-07-28 ((2457232j,0s,0n),+0s,2299161j)>