today(p1 = v1) public

Creates a date object denoting the present day.

Date.today   #=> #<Date: 2011-06-11 ...>
Show source
Register or log in to add new notes.
February 4, 2010
1 thank

Warning! Be aware of Active Record TimeZone

With the timezone support introduced in Rails 2.1 the idea is that all dates in the database are stored in UTC and all dates in Ruby are in a local timezone.

Time.zone.now == Time.now # => false