Template talk:Convert/Archive December 2018

Lakh and crore
India-related articles frequently use the lakh and crore units, especially to count people and money. I was surprised that convert does not seem to support those. It would be useful to provide conversions such as: We already have monetary conversion of rupees with INRConvert, but a separate conversion of lakh and crore without switching to USD would be useful. — JFG talk 12:10, 8 December 2018 (UTC)
 * → "21 lakh (2.1 million) people"
 * → "35 crore (350 million) rupees"
 * See MOS:NUMERAL and the links to and . Martin of Sheffield (talk) 12:16, 8 December 2018 (UTC)

e6 & abbr=unit without abbreviations?
I was working on the page Oil futures drunk-trading incident and wanted to change the section "an employee of London-based PVM Oil Futures traded 7000000 oilbbl of oil worth approximately US$520 million while drunk" to "7 e6oilbbl" (with abbr=unit) but without the unit output being abbreviated i.e. "million barrels" instead of "million bbl". Is there an option to do so? There are other articles where I would have used "5 million miles" instead of "5 million mi".-Ich (talk) 23:41, 11 December 2018 (UTC)
 * I cannot help you, but by far, this is the most wonderful topic I've met on this talkpage in 6 years: the Oil futures drunk-trading incident (having conversion issues) . -DePiep (talk) 23:57, 11 December 2018 (UTC)
 * To me, the article seems to be about:
 * - "He [Perkins] traded x barrels at y US$/barrel while drunk".
 * - Missing is:, like: "... while price was q $/barrel". Then calc the diff. How difficult can it be?
 * -DePiep (talk) 00:12, 12 December 2018 (UTC)
 * No. I'm afraid the only relevant options are abbr=off which gives "million units" for input and output, or abbr=on which uses the irritating " × 10 ^ 6" for input and output, or abbr=unit which gives "million symbols" for input and output.
 * A workaround, if the problem was widespread, would be to create a new unit such as "barrels" which is never abbreviated. I agree that "5 million mi" is pretty awful and the solution there might be to change unit "miles" (which is currently equivalent to "mi") to never be abbreviated.
 * Or, if someone can think of a short, useful option like abbr=unit that could be implemented. Values for abbr include in/out/on/off/unit/values. The trick would be to think of a new word that made sense. Johnuniq (talk) 00:27, 12 December 2018 (UTC)
 * Thanks - I actually didn't know abbr=off would give "7 million barrels (1.1 million cubic meters)" which is pretty much what I wanted (avoiding the 10^6). I have updated the trading page accordingly. (For what it's worth, I think this should be the default output for e6 instead of using scientific notation). Thanks again for your help.-Ich (talk) 23:09, 13 December 2018 (UTC)
 * P.S. I updated the documentation here.-Ich (talk) 23:26, 13 December 2018 (UTC)
 * That looks good, thanks. Johnuniq (talk) 02:20, 14 December 2018 (UTC)
 * That looks good, thanks. Johnuniq (talk) 02:20, 14 December 2018 (UTC)

Remnant: disp=flip
I notice a FAQ linked to via the redirect Template:Convert/FAQ that recommends the deprecated flip. Should this be updated to flip? —Quondum 03:23, 14 December 2018 (UTC)
 * Thanks, I had forgotten about that page. Maybe pruning would be best? Perhaps keep the questions/topics but replace the answers with a link to the section in the doc? Some short answers might be worth keeping. Johnuniq (talk) 04:35, 14 December 2018 (UTC)
 * Not much links to the FAQ – the only one of significance seems to be at the top of this talk page. It gets viewed less than once per fortnight.  The template documentation page has far more comprehensive detail.  It creates extra maintenance, and is easily allowed to become out of date.  I suggest pruning it.  You may wish to glance over it to see whether there is anything feel worth merging into the template doc page, but much of the information is already there.  —Quondum 01:14, 15 December 2018 (UTC)
 * OK I have started working on a copy of the wikitext in a local file. I'm hoping no one will edit the FAQ for a while until I'm done. Johnuniq (talk) 02:46, 15 December 2018 (UTC)
 * I have finished. Johnuniq (talk) 04:40, 15 December 2018 (UTC)

e6C, e6F
These would be useful. Thanks! Lfstevens (talk) 19:35, 1 December 2018 (UTC)
 * e6 does not work with C because of the awkward offset issue (0 °C = 32 °F) so simple scaling might be inaccurate. When dealing with e6C you probably don't care about the offset in which case the following workaround is available:
 * → 12 e6C-change
 * Johnuniq (talk) 00:15, 2 December 2018 (UTC)
 * Thanks. Lfstevens (talk) 04:25, 20 December 2018 (UTC)

"Error in convert: cannot convert "energy/area/time" to "power/area""
I tried to do 5.5 kWh/m2/day and got this error message today. 5.5 kWh/m2/day. Should we try to fix this? --Daviddwd (talk) 07:22, 27 December 2018 (UTC)
 * I don't think so. Convert does some magic in its attempt to work with automatic "per" units but figuring out that kWh/m2/day is equivalent to power/area is above what can be expected IMHO. My guess is that converts like that would be rare and some kludge to workaround the issue would be sufficient. I am impressed that convert appears to get this right:
 * → 5.5 kWh/day/m2
 * Johnuniq (talk) 09:27, 27 December 2018 (UTC)
 * Since kWh is power.time, and you're dividing by time on the left, that can be factored out: undefined kW/m2 -- Red rose64 &#x1f339; (talk) 11:13, 27 December 2018 (UTC)
 * It looks like convert can't tell the difference between (kWh/m2)/day (where the time units cancel each other) and kWh/(m2/day) (where the time units multiply).  Stepho  talk 17:55, 27 December 2018 (UTC)
 * And correctly so cannot. Input   is ambiguous (because: brackets=priorities missing, as pointed out by User:Stepho-wrs). -DePiep (talk) 22:09, 27 December 2018 (UTC)

Miles, furlongs, yards, and generally adding stuff
works great, yielding1 mi, whereas returns1 mi

So i try a, but that too fails:1 m

But thanks for an otherwise fantastic template. &mdash;Jerome Potts (talk) 08:55, 30 December 2018 (UTC)
 * Assuming you want two different units output (note the spaced list of two):
 * 1 mi &rarr;
 * 1 mi
 * — Preceding unsigned comment added by DePiep (talk • contribs) 09:26, 30 December 2018 (UTC)
 * The OP wants 1 mile + 4 furlongs + 10 yards. As noted, that does not work and the 10 is misinterpreted as the precision, while holding the cursor over the asterisk (or previewing an edit of this section) shows that "yd" is ignored. That combination has not been added because no one has yet needed it. Is it needed more than once or twice? Where? It is possible to do what is asked with chains:
 * → 1 mi
 * Johnuniq (talk) 09:51, 30 December 2018 (UTC)
 * Right, Johnuniq. Apparently some known combinations are encoded in the template logic ; i am suggesting that those be done with by replacing them with the possibility to simply add stuff. Of course, the "stuffs" would have to be compatible with one-another, say by category/class: linear, area, volume, weight, etc. &mdash;Jerome Potts (talk) 10:36, 30 December 2018 (UTC)
 * &hellip;meanwhile, since a furlong is 10 chains, is it possible to have it compute with chains in the background, while talking furlongs ? &mdash;Jerome Potts (talk) 10:44, 30 December 2018 (UTC)
 * The modules underlying the template are hugely complex. We only add functionality when there is an established need to do so. Johnuniq has already asked "Is it needed more than once or twice? Where?", which I shall amplify by asking: please give examples of articles where this proposed new feature would be useful; please also indicate why the existing functionality is not adequate for those cases. -- Red rose64 &#x1f339; (talk) 19:33, 30 December 2018 (UTC)
 * I was enhancing the Derby (horse race) article to use this template, and have since found an okay solution with multiple invocations ; at the moment i do not have other articles to mention here, and in the future i will likely have forgotten about that one, as i tend to do drive-by editing and i don't keep tabs. I was just asking, and am not too surprised by your replies, as it is obvious that managing such an elaborate functionality is a complex endeavour. Didn't i say that i was suggesting ? For what it's worth, my thinking is that if there are a bunch of "known/usual combinations" hard-coded or kept in a table somewhere for the code to look up, then the code is likely to be inflated and quite complicated, in which case a loop that grabs arguments, converts them to the standard international unit of their class, adds them up ; followed by code that converts that sum to the requested output, might be somewhat lighter, therefore easier to maintain. Apparently this is not generating immediate enthusiasm, which, again, i can understand. Also, it occurs to me that that could be opening the door to requests for other arithmetic operations, complicating further the managing of this template's parameters. &mdash;Jerome Potts (talk) 21:26, 30 December 2018 (UTC)
 * The table defining which combinations of units work together is here. It is easy to add stuff but as Redrose64 mentioned, adding everything that might be useful is resisted. Johnuniq (talk) 22:57, 30 December 2018 (UTC)

Wikidata and units
Wikidata property says it is an "abbreviation" of the unit name, and it must have 'language' specified. I started this. I think this sets back any WD conversion system some $2 1/2$ years. -DePiep (talk) 13:48, 19 December 2018 (UTC)
 * (postpone archiving) -DePiep (talk) 23:34, 30 December 2018 (UTC)