I know I can do @something.created_at.strftime('%d/%m/%y')
to get the date in dd/mm/yy format, but it's a pain.
American users however just need to do a simple: @something.created_at.strftime('%x')
, which gives mm/dd/yy.
Is it possible to rig %x
to work the proper way, i.e. the British way (since we invented time).
The correct way of doing this now is:
Then in the view:
Yep, that's it. The l method is shorthand for I18n.localize. Read more in the Rails I18n guide.