Difference between revisions of "Template:Cases in the COVID-19 pandemic/core"

From blackwiki
Jump to navigation Jump to search
imported>Sdkb
(Reverted good faith edits by 2001:B011:30E0:197E:7C0C:94D6:90DB:4CB3: I'm not sure why the changes to sig figs are being made here, and 7 seems way too many. Please discuss at talk first. (TW))
Line 4: Line 4:
 
  |conround  = {{formatnum:{{Rounddown|{{{confirmed}}}/10^6|8-{{order of magnitude|{{{confirmed}}}}}}}}}{{nbsp}}million<!-- update parameters at billion -->
 
  |conround  = {{formatnum:{{Rounddown|{{{confirmed}}}/10^6|8-{{order of magnitude|{{{confirmed}}}}}}}}}{{nbsp}}million<!-- update parameters at billion -->
 
  |deaths    = {{formatnum:{{{deaths}}}}}
 
  |deaths    = {{formatnum:{{{deaths}}}}}
  |dround    = {{formatnum:{{Rounddown|{{{deaths}}}|{{#expr:-1*({{order of magnitude|{{{deaths}}}}}-1)}}}}}}
+
  |dround    = {{formatnum:{{Rounddown|{{{deaths}}}|{{#expr:-1*({{order of magnitude|{{{deaths}}}}}-2)}}}}}}
 
  |droundt  = {{formatnum:{{Rounddown|{{{deaths}}}/10^3|0}}}}{{nbsp}}thousand
 
  |droundt  = {{formatnum:{{Rounddown|{{{deaths}}}/10^3|0}}}}{{nbsp}}thousand
 
  |recovered = {{formatnum:{{{recovered}}}}}
 
  |recovered = {{formatnum:{{{recovered}}}}}
Line 11: Line 11:
 
  |actroundno  = {{formatnum:{{Rounddown|{{#expr:{{{confirmed}}}-{{{deaths}}}-{{{recovered}}}}}|{{#expr:-1*({{order of magnitude|{{#expr:{{{confirmed}}}-{{{deaths}}}-{{{recovered}}}}}}}-2)}}}}}}
 
  |actroundno  = {{formatnum:{{Rounddown|{{#expr:{{{confirmed}}}-{{{deaths}}}-{{{recovered}}}}}|{{#expr:-1*({{order of magnitude|{{#expr:{{{confirmed}}}-{{{deaths}}}-{{{recovered}}}}}}}-2)}}}}}}
 
  |actround  = {{formatnum:{{Rounddown|({{{confirmed}}}-{{{deaths}}}-{{{recovered}}})/10^6|8-{{order of magnitude|{{{confirmed}}}-{{{deaths}}}-{{{recovered}}}}}}}}}{{nbsp}}million<!-- update parameters at billion -->
 
  |actround  = {{formatnum:{{Rounddown|({{{confirmed}}}-{{{deaths}}}-{{{recovered}}})/10^6|8-{{order of magnitude|{{{confirmed}}}-{{{deaths}}}-{{{recovered}}}}}}}}}{{nbsp}}million<!-- update parameters at billion -->
  |ratio    = {{percentage|{{{deaths}}}|{{{confirmed}}}|sigfig=7}}
+
  |ratio    = {{percentage|{{{deaths}}}|{{{confirmed}}}|sigfig=2}}
 
  |date      = {{{date}}}
 
  |date      = {{{date}}}
 
  |time      = {{{time}}}
 
  |time      = {{{time}}}

Revision as of 17:00, 12 June 2020

Template documentation

This sub-template formats and calculates the various numbers returned by Template:T to minimize the risk of error and number of explicit values that need updating. This template should not be used directly.