1.DATE
1.DATE
Date
irb(main):001:0> require "date"
=> true
irb(main):002:0> d = Date.new(2018,07,04)
=> #
irb(main):003:0>
irb(main):004:0* p d
#
=> #
irb(main):005:0>
irb(main):006:0* puts d
2018/7/4
=> nil
irb(main):007:0> puts d.year
2018
=> nil
irb(main):008:0> puts d.month
7
=> nil
irb(main):009:0> puts d.day
4
=> nil
irb(main):010:0>
irb(main):011:0* Date.parse("2018/07/04")
=> #
irb(main):012:0> puts Date.parse("2018/07/04")
2018/7/4
=> nil
irb(main):013:0>
irb(main):014:0* puts Date.parse("18/7/04")
2018/7/4
=> nil
irb(main):015:0>