<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tiffa.net/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert%2Fextra%2Fdoc</id>
	<title>Module:Convert/extra/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tiffa.net/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert%2Fextra%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.tiffa.net/w/index.php?title=Module:Convert/extra/doc&amp;action=history"/>
	<updated>2026-04-17T18:59:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.tiffa.net/w/index.php?title=Module:Convert/extra/doc&amp;diff=3565&amp;oldid=prev</id>
		<title>imported&gt;Fire: ページの作成:「{{二次利用}} This module can be used to quickly add a new unit for use with {{tl|convert}}. When satisfied that a unit is working correctly, ask at Module talk:Conv…」</title>
		<link rel="alternate" type="text/html" href="https://wiki.tiffa.net/w/index.php?title=Module:Convert/extra/doc&amp;diff=3565&amp;oldid=prev"/>
		<updated>2021-02-06T01:49:20Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「{{二次利用}} This module can be used to quickly add a new unit for use with {{tl|convert}}. When satisfied that a unit is working correctly, ask at Module talk:Conv…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{二次利用}}&lt;br /&gt;
This module can be used to quickly add a new unit for use with {{tl|convert}}. When satisfied that a unit is working correctly, ask at [[Module talk:Convert]] for the unit to be moved to the permanent list of units.&lt;br /&gt;
&lt;br /&gt;
See [[Template:Convert/unit sandbox]] for a good way to prepare unit definitions that can be copied into this page.&lt;br /&gt;
&lt;br /&gt;
The following extracts from [[Module:Convert/data]] show examples that could be used to define a new unit. Any number of spaces can be used where blanks are shown in the following.&lt;br /&gt;
&lt;br /&gt;
{{collapse top|title=Examples for additions to &amp;lt;code&amp;gt;Module:Convert/extra&amp;lt;/code&amp;gt; {{nobold|1=(For the actual module code see [[#EndOfDoc|below]])}}|bg=#CEF2E0|b-color=#A3BFB1|bg2=#F5FFFA}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; highlight=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
-- These are EXAMPLES on the documentation page. Scroll down to see the module content.&lt;br /&gt;
local extra_units = {&lt;br /&gt;
    -- Similar to a redirect: &amp;quot;sqm&amp;quot; is an alias for &amp;quot;m2&amp;quot;.&lt;br /&gt;
    -- {{convert|1.5|m2|sp=us}}  → 1.5 square meters (16 sq ft)&lt;br /&gt;
    -- {{convert|1.5|sqm|sp=us}} → 1.5 square meters (16 sq ft)&lt;br /&gt;
    [&amp;quot;sqm&amp;quot;] = {&lt;br /&gt;
        target   = &amp;quot;m2&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- A simple unit, showing the minimum that is required.&lt;br /&gt;
    -- The &amp;quot;ha&amp;quot; is the unit code used to identify the unit:&lt;br /&gt;
    -- {{convert|1.5|ha}} → 1.5 hectares (3.7 acres)&lt;br /&gt;
    [&amp;quot;ha&amp;quot;] = {&lt;br /&gt;
        name1    = &amp;quot;hectare&amp;quot;,&lt;br /&gt;
        symbol   = &amp;quot;ha&amp;quot;,&lt;br /&gt;
        utype    = &amp;quot;area&amp;quot;,&lt;br /&gt;
        scale    = 10000,&lt;br /&gt;
        default  = &amp;quot;acre&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- A unit which accepts an SI prefix. There is no &amp;quot;name1&amp;quot; field because it&lt;br /&gt;
    -- has to be constructed (mJ gives &amp;quot;millijoule&amp;quot;; MJ gives &amp;quot;megajoule&amp;quot;).&lt;br /&gt;
    -- {{convert|125|kJ}} → 125 kilojoules (30,000 cal)&lt;br /&gt;
    [&amp;quot;J&amp;quot;] = {&lt;br /&gt;
        _name1   = &amp;quot;joule&amp;quot;,&lt;br /&gt;
        _symbol  = &amp;quot;J&amp;quot;,&lt;br /&gt;
        utype    = &amp;quot;energy&amp;quot;,&lt;br /&gt;
        scale    = 1,&lt;br /&gt;
        prefixes = 1,&lt;br /&gt;
        default  = &amp;quot;cal&amp;quot;,&lt;br /&gt;
        link     = &amp;quot;Joule&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- A unit where US and plural names are required.&lt;br /&gt;
    -- {{convert|125|cm/s2}} → 125 centimetres per second squared (4.1 ft/s²)&lt;br /&gt;
    [&amp;quot;cm/s2&amp;quot;] = {&lt;br /&gt;
        name1    = &amp;quot;centimetre per second squared&amp;quot;,&lt;br /&gt;
        name1_us = &amp;quot;centimeter per second squared&amp;quot;,&lt;br /&gt;
        name2    = &amp;quot;centimetres per second squared&amp;quot;,&lt;br /&gt;
        name2_us = &amp;quot;centimeters per second squared&amp;quot;,&lt;br /&gt;
        symbol   = &amp;quot;cm/s&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&amp;quot;,&lt;br /&gt;
        utype    = &amp;quot;acceleration&amp;quot;,&lt;br /&gt;
        scale    = 0.01,&lt;br /&gt;
        default  = &amp;quot;ft/s2&amp;quot;,&lt;br /&gt;
        link     = &amp;quot;Gal (unit)&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- A &amp;quot;per&amp;quot; unit is defined as the ratio of two other units.&lt;br /&gt;
    -- {{convert|125|g/cm3}} → 125 grams per cubic centimetre (4.5 lb/cu in)&lt;br /&gt;
    [&amp;quot;g/cm3&amp;quot;] = {&lt;br /&gt;
        per      = { &amp;quot;g&amp;quot;, &amp;quot;cm3&amp;quot; },&lt;br /&gt;
        utype    = &amp;quot;density&amp;quot;,&lt;br /&gt;
        default  = &amp;quot;lb/cuin&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- If the automatic &amp;quot;per&amp;quot; link is not wanted, a link can be specified.&lt;br /&gt;
    -- {{convert|125|g/cm3|lk=on|disp=unit}} → [[gram]]s per [[cubic centimetre]]&lt;br /&gt;
    -- {{convert|125|g/m3|lk=on|disp=unit}} → [[density|grams per cubic metre]]&lt;br /&gt;
    [&amp;quot;g/m3&amp;quot;] = {&lt;br /&gt;
 per  = { &amp;quot;g&amp;quot;, &amp;quot;m3&amp;quot; },&lt;br /&gt;
 utype  = &amp;quot;density&amp;quot;,&lt;br /&gt;
 default  = &amp;quot;lb/cuyd&amp;quot;,&lt;br /&gt;
 link  = &amp;quot;density&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- Characters &amp;quot;$&amp;quot; and &amp;quot;£&amp;quot; are recognized as currency symbols.&lt;br /&gt;
    -- {{convert|125|$/acre}} → $125 per acre ($310/ha)&lt;br /&gt;
    [&amp;quot;$/acre&amp;quot;] = {&lt;br /&gt;
        per      = { &amp;quot;$&amp;quot;, &amp;quot;acre&amp;quot; },&lt;br /&gt;
        utype    = &amp;quot;cost $ per unit area&amp;quot;,&lt;br /&gt;
        default  = &amp;quot;$/ha&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- An output unit can be defined as a combination of existing units.&lt;br /&gt;
    -- {{convert|2|ha|ft2 m2}} → 2 hectares (220,000 sq ft; 20,000 m²)&lt;br /&gt;
    -- Any number of output units can be specified.&lt;br /&gt;
    -- NOTE: There may be no need to define a combination because a convert&lt;br /&gt;
    --       can specify the output by joining unit codes with &amp;quot;+&amp;quot;:&lt;br /&gt;
    -- {{convert|1.2|acre|ft2+yd2+m2}} → 1.2 acres (52,000 sq ft; 5,800 sq yd; 4,900 m²)&lt;br /&gt;
    [&amp;quot;ft2 m2&amp;quot;] = {&lt;br /&gt;
        combination = { &amp;quot;ft2&amp;quot;, &amp;quot;m2&amp;quot; },&lt;br /&gt;
        utype    = &amp;quot;area&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    -- An output unit can be defined using subunits (from least to most significant).&lt;br /&gt;
    -- {{convert|90|in|ydftin}} → 90 inches (2 yd 1 ft 6 in)&lt;br /&gt;
    [&amp;quot;ydftin&amp;quot;] = {&lt;br /&gt;
        combination = { &amp;quot;in&amp;quot;, &amp;quot;ft&amp;quot;, &amp;quot;yd&amp;quot; },&lt;br /&gt;
        multiple = { 12, 3 },&lt;br /&gt;
        utype    = &amp;quot;length&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{collapse bottom}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;symbol&amp;lt;/code&amp;gt; || Unit identifier used when &amp;lt;code&amp;gt;abbr=on&amp;lt;/code&amp;gt; is in effect.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name1&amp;lt;/code&amp;gt; || Singular name of the unit used when &amp;lt;code&amp;gt;abbr=off&amp;lt;/code&amp;gt; is in effect.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name2&amp;lt;/code&amp;gt; || Plural name of the unit; not required if it is the same as &amp;lt;code&amp;gt;name1&amp;lt;/code&amp;gt; plus &amp;quot;s&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name1_us&amp;lt;/code&amp;gt; || Singular name when &amp;lt;code&amp;gt;sp=us&amp;lt;/code&amp;gt; is in effect; not required if the same as &amp;lt;code&amp;gt;name1&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name2_us&amp;lt;/code&amp;gt; || Plural name when &amp;lt;code&amp;gt;sp=us&amp;lt;/code&amp;gt; is in effect; not required if the same as &amp;lt;code&amp;gt;name1_us&amp;lt;/code&amp;gt; plus &amp;quot;s&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;utype&amp;lt;/code&amp;gt; || Unit type; must be exactly the same as the &amp;lt;code&amp;gt;utype&amp;lt;/code&amp;gt; of any other unit used in a conversion.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;scale&amp;lt;/code&amp;gt; || Number of base units in the unit being defined.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; || Unit code of the default output used when no output unit is specified in a conversion.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; || Unit code of an existing unit (the unit being defined &amp;quot;redirects&amp;quot; to the existing unit).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;prefixes&amp;lt;/code&amp;gt; || Use 1 if an SI prefix is accepted; 2 is used for &amp;lt;code&amp;gt;m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&amp;lt;/code&amp;gt;, and 3 is used for &amp;lt;code&amp;gt;m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;link&amp;lt;/code&amp;gt; || Article title used when &amp;lt;code&amp;gt;lk=on&amp;lt;/code&amp;gt; is in effect; not required if it is the same as &amp;lt;code&amp;gt;name1&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{anchor|EndOfDoc}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Fire</name></author>
	</entry>
</feed>