• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Changes/a

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
< Template:Changes
Template documentation[view] [edit] [history] [purge]

This template takes two numbers and formats the first number and the percent increase or decrease to the second number for use in two columns of a table in ascending order. This template is invoked recursively by Template:Changes.

Use

This template has the following syntax:

{{Changes/a|number1|number2|number-dec|percent-dec|increase-color|decrease-color}}

where:

  • number1 is the base number. If the base number is not known, use NA or &#​32;.
  • number2 is the target number. If the target number is not known, use NA or &#​32;.
  • number-dec is an optional number of decimal places in the formatted base number. (default=0)
  • percent-dec is an optional number of decimal places in the formatted percent change. (default=2)
  • increase-color is an optional color for a percent increase. (default=green)
  • decrease-color is an optional color for a percent decrease. (default=red)

Example

The following syntax:

{{Changes/a|1237|1345}}

produces the following Wiki markup:

|align=right|1,237||align=right|+8.73%

See also

  • This template is identical to Template:Changes/d except that it calculates percent change in ascending order.
  • This template invokes Template:Nts, Template:Ntsh, and Template:Round.
  • This template is invoked recursively by Template:Changes.
The above documentation is transcluded from Template:Changes/a/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Changes/a&oldid=7769"
Categories:
  • Mathematical formatting subtemplates
  • Sorting templates
Last edited on 13 November 2021, at 00:40

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 13 November 2021, at 00:40.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop