How do I get today's date?


#1

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


#2

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


#3

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!


#4

Time.now
take a look at : ‘sfrtime’ method
http://www.rubycentral.com/book/ref_c_time.html