module Formulas::FrequencyConversions
Public Instance Methods
convert_annually_to_annually(number)
click to toggle source
# File lib/formulas.rb, line 28 def convert_annually_to_annually(number) number end
Also aliased as: convert_weekly_to_weekly, convert_fortnightly_to_fortnightly, convert_monthly_to_monthly
convert_annually_to_fortnightly(number)
click to toggle source
# File lib/formulas.rb, line 43 def convert_annually_to_fortnightly(number) number.to_f / 26 end
convert_annually_to_monthly(number)
click to toggle source
# File lib/formulas.rb, line 39 def convert_annually_to_monthly(number) number.to_f / 12 end
convert_annually_to_weekly(number)
click to toggle source
# File lib/formulas.rb, line 35 def convert_annually_to_weekly(number) number.to_f / 52 end
convert_fortnightly_to_annually(number)
click to toggle source
# File lib/formulas.rb, line 71 def convert_fortnightly_to_annually(number) number.to_f * 26 end
convert_fortnightly_to_monthly(number)
click to toggle source
# File lib/formulas.rb, line 79 def convert_fortnightly_to_monthly(number) (number.to_f * 26) / 12 end
convert_fortnightly_to_weekly(number)
click to toggle source
# File lib/formulas.rb, line 75 def convert_fortnightly_to_weekly(number) number.to_f / 2 end
convert_monthly_to_annually(number)
click to toggle source
# File lib/formulas.rb, line 59 def convert_monthly_to_annually(number) number.to_f * 12 end
convert_monthly_to_fortnightly(number)
click to toggle source
# File lib/formulas.rb, line 67 def convert_monthly_to_fortnightly(number) number.to_f * 12 / 26 end
convert_monthly_to_weekly(number)
click to toggle source
# File lib/formulas.rb, line 63 def convert_monthly_to_weekly(number) number.to_f * 12 / 52 end
convert_weekly_to_annually(number)
click to toggle source
# File lib/formulas.rb, line 47 def convert_weekly_to_annually(number) number.to_f * 52 end
convert_weekly_to_fortnightly(number)
click to toggle source
# File lib/formulas.rb, line 55 def convert_weekly_to_fortnightly(number) number.to_f * 52 / 26 end
convert_weekly_to_monthly(number)
click to toggle source
# File lib/formulas.rb, line 51 def convert_weekly_to_monthly(number) number.to_f * 52 / 12 end