Project

inflation

0.0
No commit activity in last 3 years
No release in over 3 years
Find out how much money was worth any year from 1800 to now.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

Inflation

This simple gem makes it easy to calculate how much different amounts of money would be worth in certain years. Years from 1800 - 2012 are supported.

Installation

Add this line to your application's Gemfile:

gem 'inflation'

And then execute:

$ bundle

Or install it yourself as:

$ gem install inflation

Usage

require 'inflation'

# Return the value (rounded to 2 decimal points)
1.from(1800).to(2012)

# Or, if you like more English sounding method chaining...
1.from_1800.to_2012

# Even better, you can use from_now and to_now instead of the year
1.from_now.to_2010
1.from_1898.to_now

# Return true if the year is supported.
1840.year?
=> true

1784.year?
=> false

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request