Date Localization and formatting

I18n.l is the easiest way to do it


And in case you want to use a different format :

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

You will find more documentation here


Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Sending Binary Data over the Network with Json