Date Localization and formatting

I18n.l is the easiest way to do it

I18n.l(@user.created_at)

And in case you want to use a different format :

I18n.l(@user.created_at, :format => :short)

You will find more documentation here

Comments

Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Interview Question on Ruby on Rails