Class Time
In: lib/localization_simplified.rb
Parent: Object

Modification of default Time format using Time.to_formatted_s(:default) Localizes the hash with the formats :default, :short, :long Usage: <% t = Time.parse(‘2006-12-25 13:55’) %> <%= t.to_formatted_s(:short) #=> outputs time in localized format %> <%= t #=> outputs time in localized format %>

Methods

strftime  

External Aliases

strftime -> old_strftime

Public Instance methods

Pre-translate format of Time before the time string is translated by strftime. The :default time format is changed by localizing month and daynames. Also Rails ActiveSupport allow us to modify the :default timeformatting string. Originally, its :default => "%a, %d %b %Y %H:%M:%S %z" (RFC2822 names), but as it can be modified in this plugin, and we can end up with a different file format in logfiles, etc

[Source]

     # File lib/localization_simplified.rb, line 166
166:   def strftime(date) 
167:     LocalizationSimplified::localize_strftime(date, self)
168:     old_strftime(date)
169:   end

[Validate]