Follow Along as I Stumble on the Path to Learning RoR

Setting a Variable to a Specific Date

If you need to set a variable to a specific date, the way to do it is to use the Date.new method.

Date.new(year, month, day)

For example:

foo = Date.new(2013, 8, 31)

Advertisements

Comments are closed.