module I18n::Tests::Localization::Time - i18n-0.6.11 Documentation

# module I18n::Tests::Localization::Time

### Public Instance Methods

setup() click to toggle source
Calls superclass method

    # File lib/i18n/tests/localization/time.rb, line 6
    def setup
      super
      setup_time_translations
      @time = ::Time.utc(2008, 3, 1, 6, 0)
      @other_time = ::Time.utc(2008, 3, 1, 18, 0)
    end

### Protected Instance Methods

setup_time_translations() click to toggle source

    # File lib/i18n/tests/localization/time.rb, line 64
    def setup_time_translations
      I18n.backend.store_translations :de, {
        :time => {
          :formats => {
            :default => "%a, %d. %b %Y %H:%M:%S %z",
            :short => "%d. %b %H:%M",
            :long => "%d. %B %Y %H:%M",
          },
          :am => 'am',
          :pm => 'pm'
        }
      }
    end