Forum: Ruby on Rails How do I get today's date?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sean C. (Guest)
on 2006-06-01 12:51
I know this is a simple question, but i just want to put the current
day, month, date and year on my website. I still can't figure out how to
read the Rails API. Can anybody help me out? TIA
Stephen B. (Guest)
on 2006-06-01 13:00
Time.now/Date.now should do the trick.

Steve


sean colquhoun wrote:
> I know this is a simple question, but i just want to put the current
> day, month, date and year on my website. I still can't figure out how to
> read the Rails API. Can anybody help me out? TIA
Ioana K. (Guest)
on 2006-06-01 13:01
(Received via mailing list)
Time.now
take a look at : 'sfrtime' method
http://www.rubycentral.com/book/ref_c_time.html
Sean C. (Guest)
on 2006-06-01 13:31
Ioana K. wrote:
> Time.now
> take a look at : 'sfrtime' method
> http://www.rubycentral.com/book/ref_c_time.html

YAY!
Thanks, both of you guys. I'm not at the level where I can deduce
procedure from method or object names only. That strftime link was just
what I needed. Thanks!
This topic is locked and can not be replied to.