You can also use this.to_s(:short) which is a bit more i18n friendly. The formats (:default, :long, :short, and any custom ones you like) are defined in an initializer such as config/initializers/ datetime.rb. Mine looks like:
Date::DATE_FORMATS[:default] = '%d/%m/%Y' Date::DATE_FORMATS[:long] = '%d %B %Y' Time::DATE_FORMATS[:default] = '%d/%m/%Y %H:%M:%S' Time::DATE_FORMATS[:long] = '%d %b %Y %H:%M:%S' Time::DATE_FORMATS[:time] = '%I:%M %p' DateTime::DATE_FORMATS[:default] = '%d/%m/%Y %H:%M:%S' Dean -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
