Difference between revisions of "Template:Align Ticks"

From RimWorld Wiki
Jump to navigation Jump to search
(template for aligning ticks in tables)
 
m
 
Line 1: Line 1:
<includeonly>{{#ifexpr: {{#vardefineecho:ticks|{{formatnum:{{{1|}}}|R}}}} < 1000000 | {{#ifexpr: {{{2|6}}} > 6 | {{0|0,}} }} }}{{#ifexpr: {{#vardefineecho:ticks|{{formatnum:{{{1|}}}|R}}}} < 100000 | {{#ifexpr: {{{2|6}}} > 5 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 10000 | {{#ifexpr: {{{2|6}}} > 4 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 1000 | {{#ifexpr: {{{2|6}}} > 3 | {{0|0,}} }} }}{{#ifexpr: {{#var:ticks}} < 100 | {{#ifexpr: {{{2|6}}} > 2 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 10 | {{#ifexpr: {{{2|6}}} > 1 | {{0}} }} }}{{Ticks|{{{1|}}}}}</includeonly><noinclude>
+
<includeonly>{{#ifexpr: {{#vardefineecho:ticks|{{formatnum:{{{1|}}}|R}}}} < 1000000 | {{#ifexpr: {{{2|6}}} > 6 | {{0|0,}} }} }}{{#ifexpr: {{#var:ticks}} < 100000 | {{#ifexpr: {{{2|6}}} > 5 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 10000 | {{#ifexpr: {{{2|6}}} > 4 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 1000 | {{#ifexpr: {{{2|6}}} > 3 | {{0|0,}} }} }}{{#ifexpr: {{#var:ticks}} < 100 | {{#ifexpr: {{{2|6}}} > 2 | {{0}} }} }}{{#ifexpr: {{#var:ticks}} < 10 | {{#ifexpr: {{{2|6}}} > 1 | {{0}} }} }}{{Ticks|{{{1|}}}}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 22:17, 19 September 2022

Documentation icon Template documentation[view] [edit] [history] [purge]

Summary[edit]

This table can be used to align ticks. This might be useful in tables and lists. It has two parameters:

  • The first parameter is the number of ticks. They will be converted using {{Ticks}}.
  • The second parameter is the expected maximum length of the first parameter.

Examples[edit]

{{Align Ticks|1|2}}
{{Align Ticks|10|2}}

0tick (0.02 secs)

10 ticks (0.17 secs)

Default length is seven:

{{Align Ticks|10,000}}
{{Align Ticks|100,000}}

010,000 ticks (2.78 mins)

100,000 ticks (27.78 mins)

Maximum length is seven:

{{Align Ticks|1|7}}
{{Align Ticks|10|7}}
{{Align Ticks|100|7}}
{{Align Ticks|1,000|7}}
{{Align Ticks|10,000|7}}
{{Align Ticks|100,000|7}}
{{Align Ticks|1,000,000|7}}

0,000,00tick (0.02 secs)

0,000,010 ticks (0.17 secs)

0,000,100 ticks (1.67 secs)

0,001,000 ticks (16.67 secs)

0,010,000 ticks (2.78 mins)

0,100,000 ticks (27.78 mins)

1,000,000 ticks (277.78 mins)