Template:JPY: Difference between revisions

From MiiWiki
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
${{#expr:{{{1|1}}}*{{JPY/Constant}}{{#if:{{{2|}}}||round 2}}}}{{#if:{{{2|}}}|{{#ifeq:{{#sub:{{#expr:{{{1|1}}}*{{JPY/Constant}} round 2}}|-2|1}}|.|0}}}}<noinclude>
¥{{{1|1}}} (${{#expr:{{{1|1}}}*{{JPY/Constant}}{{#if:{{{2|}}}||round 2}}}}{{#if:{{{2|}}}|{{#ifeq:{{#sub:{{#expr:{{{1|1}}}*{{JPY/Constant}} round 2}}|-2|1}}|.|0}}}})<noinclude>
{{/doc}}[[category:Templates]]</noinclude>
{{/doc}}[[category:Templates]]</noinclude>

Revision as of 16:08, 24 July 2023

¥1 ($0.01)

Usage

This template converts Japanese Yen (JPY) into US Dollars (USD). Simply enter {{JPY|amount of yen}} and it will be converted. This template is useful for estimating how much a Japanese product costs, as exchange rates can change noticeably.

Notes

  • The amount is rounded to the nearest cent.
  • Cents will not show if the amount rounds to an exact dollar.
  • If a second parameter is added, the number will be displayed unrounded.
    • This is not recommended, as the exchange rate constant is only updated every so often, therefore the template can only stay so accurate.
  • The exchange rate is based on the constant located here. The number is sourced from Xe.com, and should be updated at least monthly.