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 -- Posted via http://www.ruby-forum.com/.
Time.now take a look at : ''sfrtime'' method http://www.rubycentral.com/book/ref_c_time.html On 6/1/06, sean colquhoun <seancolquhoun@gk-a.com> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060601/da7cf1ab/attachment.html
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-- Posted via http://www.ruby-forum.com/.
From: sean colquhoun <seancolquhoun@gk-a.com>> Subject: [Rails] How do I get today''s date? > To: rails@lists.rubyonrails.org > Message-ID: <819bdc40592ce126049f378d9b43bc0e@ruby-forum.com> > Content-Type: text/plain; charset=utf-8 > > 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? TIADate.Today gives u the current date, you can then format it using any of the date formatting methods. Regards, Bharat
Ioana Kanda wrote:> Time.now > take a look at : ''sfrtime'' method > http://www.rubycentral.com/book/ref_c_time.htmlYAY! 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! -- Posted via http://www.ruby-forum.com/.