0.0.1 • Published 8 years ago

inflation-cpi v0.0.1

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

inflation-cpi

Convert dollar amounts between years using BLS CPI figures

Sources

Installation

npm install inflation-cpi

Usage

var inflation = require("inflation-cpi");

// examples from http://www.usinflationcalculator.com/frequently-asked-questions-faqs/
var twenty_dollars_in_1980 = inflation(
	1980, // target year
	2011, // original year
	20     // amount
);
// 7.32

var movie_ticket_inflation = inflation(
	2011, // target year
	1970, // original year
	0.5     // amount
);
// 2.90