Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a22f017baeb8724e

Jump to content

Template:Inflation/testcases

From Wikipedia, the free encyclopedia

Examples for all supported currency types

[edit]

100 in 2000, adjusted to latest supported year

[edit]
{{Inflation|AU|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
178 178
{{Inflation|AU-road|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
184 184
{{Inflation|BD|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
486 486
{{Inflation|CA|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
172 172
{{Inflation|DE|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
70 70
{{Inflation|IR|100|1379}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
2400 2400
{{Inflation|JP|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
111 111
{{Inflation|KRW|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
185 185
{{Inflation|PH|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
219 219
{{Inflation|PK|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
509 509
{{Inflation|UK|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
190 190
{{Inflation|UK-GDP|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
181 181
{{Inflation|US|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
187 187
{{Inflation|US-GDP|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
173 173
{{Inflation|ZAR|100|2000}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
319 319

100 in 2000, adjusted to 2014

[edit]
{{Inflation|AU|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
148 148
{{Inflation|AU-road|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
173 173
{{Inflation|BD|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
253 253
{{Inflation|CA|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
131 131
{{Inflation|DE|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
64 64
{{Inflation|IR|100|1379|1393}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
968 968
{{Inflation|JP|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
98 98
{{Inflation|KRW|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
149 149
{{Inflation|PH|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
180 180
{{Inflation|PK|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
329 329
{{Inflation|UK|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
138 138
{{Inflation|UK-GDP|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
135 135
{{Inflation|US|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
137 137
{{Inflation|US-GDP|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
133 133
{{Inflation|ZAR|100|2000|2014}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
261 261


Changes to data set

[edit]
dependencies
Test cases for
UKTEST
A widget in 1900 was worth £90 (Approximately £9564 today)A widget in 1900 was worth £90 (Approximately £8245 today)
A widget in 1900 was worth £90 (Approximately £2229 in 1980)A widget in 1900 was worth £90 (Approximately £2271 in 1980)
A pre-decimal penny was worth in 1854 about the same as 40p today.A pre-decimal penny was worth in 1854 about the same as 33p today.[1]
This should be 1.031252968557£1 in 2011 is worth approximately £1.03 today.

Errors

[edit]
Missing parameters fail
{{Inflation}}

{{Inflation}}

Error when using {{Inflation}}: |index= (parameter 1), |value= (parameter 2) and |start_year= (parameter 3) must be specified.

{{Inflation/sandbox}}

Error when using {{Inflation}}: |index= (parameter 1), |value= (parameter 2) and |start_year= (parameter 3) must be specified.

Index fail
{{Inflation|INVALID|b|c}}

{{Inflation}}

Error when using {{Inflation}}: |index=INVALID (parameter 1) not a recognized index.

{{Inflation/sandbox}}

Error when using {{Inflation}}: |index=INVALID (parameter 1) not a recognized index.

Non-numeric fail
{{Inflation|DE|b|c}}

{{Inflation}}

Error when using {{Inflation}}: NaN, check parameters for non-numeric data: |value=b (parameter 2) and |start_year=c (parameter 3).

{{Inflation/sandbox}}

Error when using {{Inflation}}: NaN, check parameters for non-numeric data: |value=b (parameter 2) and |start_year=c (parameter 3).

Significant digits

[edit]
{{Inflation|US|1|2017|2018|r=1}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
1 1
{{Inflation|US|1|2017|2018|r=2}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
1.02 1.02
{{Inflation|US|1|2017|2018|r=3}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
1.024 1.024
{{Inflation|US|0.96|2017|2018|r=1}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
1 1
{{Inflation|US|0.96|2017|2018|r=2}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
0.98 0.98
{{Inflation|US|0.96|2017|2018|r=3}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
0.983 0.983

Equivalence

[edit]
{{Inflation|US|96|2017|2018|fmt=eq |r=0}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
equivalent to $98 in 2018 equivalent to $98 in 2018
{{Inflation|US|96|2017|2018|fmt=eqm |r=0}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
98 98
{{Inflation|US|96|2017|2018|cursign=£ |fmt=eq |orig=yes |r=0}}
Side by side comparison
{{Inflation}}{{Inflation/sandbox}}
£96 (equivalent to £98 in 2018) £96 (equivalent to £98 in 2018)

Wrapping with Template:format price

[edit]
  • Green tick ${{Format price|{{Inflation|US-GDP|10000000000000|1900}}}}$309 trillion
  • Green tick ${{Format price|{{Inflation|US-GDP|1000000|1990}}}}$2.12 million
  • Green tick DM {{Format price|{{Inflation|DE|1000000|1957|1978}}}}DM 2.01 million
  • Green tick £{{Format price|{{Inflation|UK-GDP|1000|1323}}}}£765,689

sandbox:

  • Green tick ${{Format price|{{Inflation/sandbox|US-GDP|10000000000000|1900}}}}$309 trillion
  • Green tick ${{Format price|{{Inflation/sandbox|US-GDP|1000000|1990}}}}$2.12 million
  • Green tick DM {{Format price|{{Inflation/sandbox|DE|1000000|1957|1978}}}}DM 2.01 million
  • Green tick £{{Format price|{{Inflation/sandbox|UK-GDP|1000|1323}}}}£765,689

Other test cases

[edit]
Very large amount of money
{{Inflation|US|25000000000|2010}}

{{Inflation}}

36910575309

{{Inflation/sandbox}}

36910575309

References

[edit]
  1. UK Consumer Price Index inflation figures from 1209–2024 based on data from "Inflation calculator". Bank of England. London. February 18, 2026. Retrieved April 1, 2026.