Difference between revisions of "Template:Infobox UK place/dist"
Jump to navigation
Jump to search
imported>Twiceuponatime (sub-template to simplify main template) |
imported>Twiceuponatime (change code to use Template:Convert) |
||
| Line 1: | Line 1: | ||
| − | <!-- this template is for formatting a distance | + | <!-- this template is for formatting a distance (using {{Convert}}) |
if type=mile then output is mm mi (kk km) otherwise kk km (mm mi) | if type=mile then output is mm mi (kk km) otherwise kk km (mm mi) | ||
| − | output is | + | rounding of output is based on input, unless less than 10 when one decimal place is used |
| − | --><includeonly>{{#ifeq: {{{type|}}}|mile|<!-- then -->{{formatnum: {{{distance|}}} }} | + | --><includeonly>{{#ifeq: {{{type|}}}|mile|<!-- then -->{{convert|{{formatnum: {{{distance|}}}|R}}|mi|km|lk=on|abbr=on|{{#ifexpr: {{{distance|}}}<10|1|}} }}|<!-- else -->{{convert|{{formatnum: {{{distance|}}}|R}}|km|mi|lk=on|abbr=on|{{#ifexpr: {{{distance|}}}<10|1|}} }} }}</includeonly> |