Difference between revisions of "JapanTax"
From Sega Retro
m (Text replacement - "Category:Sega Retro templates" to "Category:Templates") |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{#vardefine:priceonly|{{stripref|{{{1|}}}}}}}{{#vardefine:priceclean|{{#replace:{{#var:priceonly}}|,}}}}{{#switch:{{#var:priceonly}}|free={{{1|}}}|{{#switch:{{#sub:{{#var:priceonly}}|-1}} | {{#vardefine:priceonly|{{stripref|{{{1|}}}}}}}{{#vardefine:priceclean|{{#replace:{{#var:priceonly}}|,}}}}{{#switch:{{#var:priceonly}}|free={{{1|}}}|{{#switch:{{#sub:{{#var:priceonly}}|-1}} | ||
− | | i={{#replace:{{{1|}}}|{{#var:priceonly}}|{{numformat|{{#expr:({{#explode:{{#var:priceclean}}|i|0}}/{{dateswitch|date={{{2|}}}|1.00|1989-04-01=1.03|1997-04-01=1.05|2014-04-01=1.08}}) round 0}}}} (''{{numformat|{{#replace:{{#var:priceclean}}|i}}}}'')}} | + | | i={{#replace:{{{1|}}}|{{#var:priceonly}}|{{numformat|{{#expr:({{#explode:{{#var:priceclean}}|i|0}}/{{dateswitch|date={{{2|}}}|1.00|1989-04-01=1.03|1997-04-01=1.05|2014-04-01=1.08|2019-10-01=1.10}}) round 0}}}} (''{{numformat|{{#replace:{{#var:priceclean}}|i}}}}'')}} |
− | | e={{#replace:{{{1|}}}|{{#var:priceonly}}|{{numformat|{{#replace:{{#var:priceclean}}|e}}}} (''{{numformat|{{#expr:({{#explode:{{#var:priceclean}}|e|0}}*{{dateswitch|date={{{2|}}}|1.00|1989-04-01=1.03|1997-04-01=1.05|2014-04-01=1.08}}) round 0}}}}'')}} | + | | e={{#replace:{{{1|}}}|{{#var:priceonly}}|{{numformat|{{#replace:{{#var:priceclean}}|e}}}} (''{{numformat|{{#expr:({{#explode:{{#var:priceclean}}|e|0}}*{{dateswitch|date={{{2|}}}|1.00|1989-04-01=1.03|1997-04-01=1.05|2014-04-01=1.08|2019-10-01=1.10}}) round 0}}}}'')}} |
| {{{1|}}} | | {{{1|}}} | ||
}}}}<noinclude> | }}}}<noinclude> | ||
Line 13: | Line 13: | ||
Add "i" or "e" to the end of the price, if said price includes or excludes tax. | Add "i" or "e" to the end of the price, if said price includes or excludes tax. | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 12:57, 1 January 2022
Usage
{{JapanTax|PRICEi/PRICEe|DATE}}
- {{JapanTax|1,620i|2017-07-07}} -> 1,500 (1,620)
- {{JapanTax|1,500e|2017-07-07}} -> 1,500 (1,620)
- {{JapanTax|2,800e|2008-07-07}} -> 2,800 (2,940)
- {{JapanTax|free|2008-07-07}} -> free
Add "i" or "e" to the end of the price, if said price includes or excludes tax.