Jump to content

Template:Coins: Difference between revisions

From MirkLurk Wiki
repo-sync: e770fb01a4f6 text:49d734c631dc40c8b881b859937ccc0a
 
repo-sync: c55e619ed136 text:7d4bc077d4ac6e8da9dcdd29c0a40921
 
Line 1: Line 1:
<includeonly>{{#invoke:Display|coins|{{{1|}}}}}</includeonly><noinclude>
<includeonly>{{#invoke:Display|coins|{{{1|}}}|{{{2|}}}}}</includeonly><noinclude>
Display a nonnegative integer total in copper: <nowiki>{{Coins|1234}}</nowiki> gives 1 gold, 2 silver and 34 copper. One gold is 1000 copper; one silver is 100 copper. Zero displays 0 copper; other zero denominations are omitted.
Display a nonnegative integer total in copper: <nowiki>{{Coins|1234}}</nowiki> gives 1 gold, 2 silver and 34 copper. One gold is 1000 copper; one silver is 100 copper. Zero displays 0 copper; other zero denominations are omitted. An optional unit shows the whole total in one denomination: <nowiki>{{Coins|1000|silver}}</nowiki> gives 10 silver and <nowiki>{{Coins|1000|copper}}</nowiki> gives 1000 copper.


Accepts 1 to 18 ASCII digits (0 through 999999999999999999), with optional surrounding whitespace. No signs, fractions, exponents or separators. Invalid input displays an error. This formats a value, not a shop-price calculation: items still own their price views and coin pages still own their summary tables.
Accepts 1 to 18 ASCII digits (0 through 999999999999999999), with optional surrounding whitespace. No signs, fractions, exponents or separators. Invalid input displays an error. This formats a value, not a shop-price calculation: items still own their price views and coin pages still own their summary tables.
</noinclude>
</noinclude>

Latest revision as of 01:24, 16 October 2026

Display a nonnegative integer total in copper: {{Coins|1234}} gives 1 gold, 2 silver and 34 copper. One gold is 1000 copper; one silver is 100 copper. Zero displays 0 copper; other zero denominations are omitted. An optional unit shows the whole total in one denomination: {{Coins|1000|silver}} gives 10 silver and {{Coins|1000|copper}} gives 1000 copper.

Accepts 1 to 18 ASCII digits (0 through 999999999999999999), with optional surrounding whitespace. No signs, fractions, exponents or separators. Invalid input displays an error. This formats a value, not a shop-price calculation: items still own their price views and coin pages still own their summary tables.