Forum: Ruby on Rails Human dates

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.
Vince W. (Guest)
on 2006-06-11 02:42
when I print Time.now,

Today is <%= Time.now %>

I get output like

 It is now Sat Jun 10 18:39:33 EDT 2006


Is there a simple way to change my code so I just get


It is now June 10, 2006


Thanks..
Daniel B. (Guest)
on 2006-06-11 02:59
(Received via mailing list)
Vince W. wrote:
>
>
> It is now June 10, 2006
>
>
> Thanks..
>

See Time#strftime.

Regards,

Dan
BB (Guest)
on 2006-06-11 08:29
Yeah, it's definitely worth knowing strftime, but here is what you
requested.

Today is <%= Time.now.strftime("%B %d, %Y") %>
This topic is locked and can not be replied to.