Class: Mack::Localization::DateFormatEngine::DE

Inherits:
Base
  • Object
show all
Defined in:
lib/mack-localization/format_engine/df_engines/de.rb

Instance Method Summary collapse

Methods inherited from Base

#format

Instance Method Details

#date_format_template(type) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/mack-localization/format_engine/df_engines/de.rb', line 6

def date_format_template(type)
  hash = ivar_cache("df_hash") do
    df_hash = {
      :df_short    => "dd/mm/yyyy",
      :df_medium   => "DD, dd MM, yyyy",
      :df_long     => "DD, dd MM, yyyy"
    }
  end
  return hash["df_#{type}".to_sym]
end

#days_of_week(type) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/mack-localization/format_engine/df_engines/de.rb', line 17

def days_of_week(type)
  hash = ivar_cache("dow_hash") do 
    dow_hash = {
      :dow_short   => %w{M D M D F S S},
      :dow_medium   => %w{Mon Die Mit Don Fre Sam Son},
      :dow_long    => %w{Montag Dienstag Mittwoch Donnerstag Freitag Samstag Sonntag},
    }
  end
  return hash["dow_#{type}".to_sym]
end

#months(type) ⇒ Object



28
29
30
31
32
33
34
35
36
37
# File 'lib/mack-localization/format_engine/df_engines/de.rb', line 28

def months(type)
  hash = ivar_cache("m_hash") do 
    m_hash = {
      :month_short => %w{Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez},
      :month_medium => %w{Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez},
      :month_long  => %w{Januar Februar März April Mai Juni Juli August September Oktober November Dezember}
    }
  end
  return hash["month_#{type}".to_sym]
end