Human dates


#1

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…


#2

Vince W. wrote:

It is now June 10, 2006

Thanks…

See Time#strftime.

Regards,

Dan


#3

Yeah, it’s definitely worth knowing strftime, but here is what you
requested.

Today is <%= Time.now.strftime("%B %d, %Y") %>