You can do something like this (utilizing a Rails time method):
class Time
def self.today
Time.now.beginning_of_day
end
end
>> Time.today
=> Mon Aug 31 00:00:00 +1200 2009
Regards
Kieran
On Aug 29, 8:24 pm, Fernando Perez <[email protected]>
wrote:
> > Time.today exists on 1.8.7,
> > but not 1.9.1 (or 1.8.6 to my knowledge)
>
> Damn that's the answer!
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---