Dmitry Hazin wrote:> If I use form.text_field :date for the form, can I format the :date
> somehow, say change the time display format?
>
> Tks
Hi Hazin,
-----------------------------------------------------------
def nice_date(date)
date.strftime("%A %d %B %Y - %H%l:%M %p")
end
...
...
form.text_field nice_date(:date)
==========================================================
Maybe this method might help you.
Regards,
- Janeve
--
Posted via http://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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---