In Rails 2, if you wanted to define a named date/time format, the conventional way was to make an initializer which would modify the DATE_FORMATS hash that ActiveSupport mixed into Date and Time:
# config/initializers/date_and_time_formats.rb
def military_hour_to_civil_hour(hour)
mod = (hour % 12)
mod + (12 * (mod > 0 ? 0 : 1))
end
Date::DATE_FORMATS[:std] = lambda {|d| "#{d.month}/#{d.day}/#{d.year}" }