Module: Duration

Defined in:
lib/rresume/duration.rb

Instance Method Summary collapse

Instance Method Details

#human_months(months) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/rresume/duration.rb', line 3

def human_months(months)
  if months > 12
    mehrzahl=""
    mehrzahl="e" if months > 24-1
    "> "+jahre(months).to_s+" Jahr"+mehrzahl
  else
    mehrzahl=""
    mehrzahl="e" if months > 1
    months.to_s+" Monat"+mehrzahl
  end
end

#jahre(monate) ⇒ Object



15
16
17
# File 'lib/rresume/duration.rb', line 15

def jahre(monate)
  monate/12.0.round
end