Template talk:US$

message: Can a more general version be produced to handle any ISO currency code?  There's a discussion started at Wikipedia_talk:Manual_of_Style_(dates_and_numbers)/Archive_99#Currencies_query.  I'm thinking something that would take  and render it as "US$100.00 (CAD$130.34 in 2006)" or whatever the FOREX histories show.LeadSongDog (talk) 18:23, 18 April 2008 (UTC)
thread_title: Generalize?

message: The recommendations by the Manual of Style differ from this template. Can you please look into this and fix either one or the other:
Wikipedia:Manual_of_Style_%28dates_and_numbers%29#Currency
Samsara (talk • contribs) 15:16, 19 May 2006 (UTC)
replies: text: I have changed the template to be in accordance with the Manual of Style. I think this template maybe should be deleted. It requires more typing than not using the template and it is highly doubtful that the standard will be changed from the English standard usage there now. - Centrx 19:33, 19 May 2006 (UTC)
replies: text: Actually, to link the US$, it requires less typing. - Centrx 19:36, 19 May 2006 (UTC)
replies: text: Before it can be deleted, the pages that use it have to be changed. There are only about 20 of them. Can you do this? - Samsara (talk • contribs) 18:13, 24 May 2006 (UTC)
thread_title: Template does not agree with MOS

message: Template:US$/doc is done. See Template:Documentation/doc.
Replace current noinclude section with:


—Preceding unsigned comment added by William Allen Simpson (talk • contribs) 16:25, 19 April 2009 (UTC)
replies: text: Done, thanks. Amalthea 17:09, 19 April 2009 (UTC)
thread_title: Template:documentation

message: Requesting sync with the new sandbox for a minor tweak to allow for the parameter to be omitted. Chris Cunningham (not at work) - talk 09:58, 21 August 2009 (UTC)
replies: text: — Martin (MSGJ · talk) 10:49, 21 August 2009 (UTC)
thread_title: Minor edits

message: Could we get a year or date paramater? The dollar has incurred notable inflation over time. $10 in 1990 would get you $16.21 worth today, and $10 today would be worth $5.83 in 1990. See inflation calculator.Smallman12q (talk) 22:44, 14 April 2010 (UTC)
replies: text: I've written the code for this to work using the Bureau of Labor Statistics' inflation calculator. See below (a subpage will need to be created at Template:US$/Inflation).. --Yarnalgo talk to me 07:02, 12 May 2010 (UTC)

text: Is this code ready to go? Has it been tested? I notice that a "required subtemplate" is still a redlink ... Some clarification please. — Martin (MSGJ · talk) 21:10, 12 May 2010 (UTC)
replies: text: Its been tested in my sandbox (examples here). It's fully ready to go... I'll create the subpage right now. --Yarnalgo talk to me 22:36, 12 May 2010 (UTC)
replies: text: Could you stick it in Template:US$/sandbox, removing all the links to your userspace? — Martin (MSGJ · talk) 11:07, 13 May 2010 (UTC)
replies: text: I put it there with the testcases at Template:US$/testcases. --Yarnalgo talk to me 23:10, 13 May 2010 (UTC)
replies: text: Looks good!  — Martin (MSGJ · talk) 20:54, 16 May 2010 (UTC)

text: I updated the sandbox to simply not display the parenthetical if the year is outside the 1913–2009 range (see the testcases). I could also make it display a simple error message (something like ). --Yarnalgo talk to me 21:49, 16 May 2010 (UTC)
replies: text:  I think this template should use the calculation (or at least the data) from , so that it doesn't have to be maintained in both places. Amalthea 22:07, 16 May 2010 (UTC)
replies: text: Wow... I wish I'd seen that template earlier haha. I did a quick update so this template is now using that template's data but I'll update the sandbox so that it will just use that template completely. --Yarnalgo talk to me 00:08, 17 May 2010 (UTC)
replies: text: Okay, I changed it to use the  template and am requesting a sync with the sandbox. --Yarnalgo talk to me 03:53, 17 May 2010 (UTC)
replies: text:  Tim Song (talk) 05:08, 17 May 2010 (UTC)
thread_title: Year parameter

message: Requesting a sync with the sandbox. I've improved the rounding for inflation: It will automatically round to the nearest dollar (instead of cent) if it is over $1000. Also, a new  parameter can be used to control the rounding to any amount. (see testcases for examples). --Yarnalgo talk to me 23:20, 27 May 2010 (UTC)
replies: text: Ronhjones  (Talk) 23:41, 28 May 2010 (UTC)
thread_title: Improved rounding for inflation

message: According to WP:NBSP, "US$5.3 million" should be coded as "US$5.3 million" or its  equivalent, so it won't word wrap to the next line between "5.3" and "million". That can be accomplished by coding . But perhaps your template should make the nbsp automatic, because most editors won't remember it otherwise – and also because the above workaround looks as if it won't work, even though it does. Art LaPella (talk) 04:39, 22 July 2010 (UTC)
replies: text: Trivially fixed by wrapping the template in a nowrap span. I also removed the non-breaking space before the optional value for equivalence, as WP:NBSP says nothing about it being undesirable to wrap before parentheses. Can you test the code in the sandbox to see if this resolves the problem for you? Chris Cunningham (user:thumperward: not at work) - talk 08:56, 22 July 2010 (UTC)
replies: text: Yes. I've never done such a test before, but it works for this and this (it didn't work for , but the non-sandbox version doesn't handle that case either). I unmaximized that page and stretched the window in and out, and the nbsp's worked as intended. So thank you. Art LaPella (talk) 21:23, 22 July 2010 (UTC)
replies: text:  Just to confirm: are there still cases where there are bugs, before I make a request to get this live? Chris Cunningham (user:thumperward: not at work) - talk 09:40, 23 July 2010 (UTC)
replies: text: I would make it live. The bug I described already exists, even if you don't make the change. Art LaPella (talk) 18:02, 23 July 2010 (UTC)
replies: text:  I've now  this (first ever use of my new admin bit, woo!). If there are any problems please let me know ASAP. Chris Cunningham (user:thumperward: not at work) - talk 08:54, 4 August 2010 (UTC)
replies: text: apparently the latest changes made leaves an unwanted trailing space that interferes with punctuation. example: ♦.  --emerson7 15:28, 1 September 2010 (UTC)
replies: text:  Fixed in sandbox, tested, and deployed. Chris Cunningham (user:thumperward: not at work) - talk 16:10, 1 September 2010 (UTC)
replies: text:  great!....i took the liberty of ripping off adapting your work for  and  . --emerson7 18:53, 1 September 2010 (UTC)
thread_title: nbsp

message: Is is possible to offer the option to handle price ranges, such as how  handles ranges? – VisionHolder « talk » 08:37, 9 January 2011 (UTC)
replies: text: I think that should be possible and would be a good feature. I don't have time to do it myself in the next month though.  Stepho  (talk) 23:33, 12 January 2011 (UTC)
thread_title: Price ranges

message: Currently, the template displays large currency values in their entirety or in scientific notation. Since large currency values are discussed in millions, billions, and trillions of dollars, there should be an option to display large currency values with the corresponding abbreviations (e.g. $1M for $1,000,000 $10bn for $10,000,000,000). If you know how to code this in the template, please do so. –Temporal User (Talk) 01:52, 27 August 2011 (UTC)
replies: text: It's a good idea but a bit beyond my current skills. Perhaps one of the other editors can have a crack at it.  Stepho  talk  08:45, 27 August 2011 (UTC)
replies: text: Have a look at Draft:Template:FXConvert/Wordify. I extended it from Template:INRConvert/Wordify. Trigenibinion (talk) 18:43, 3 January 2021 (UTC)

text: +1 on this, it would be a nice feature to have. Something like  and T, B or M (trillion, billion or million) to force a specific scale (even if such a scale results in something like 0.75M or 1,500M) or a simple 0 (disabled) or 1 (enabled) to have the template automagically decide based on the input value to use million (for values > 1 million but < 1 billion), billion (for values > 1 billion but < 1 trillion) or trillion (for values > 1 trillion). —Locke Cole • t • c 17:09, 18 January 2024 (UTC)
thread_title:  Request for shortening of large numbers 

message: * After reading through the talk page I'm not going to request any edits anyway, but I wanted to ask: why is this template is protected at all? According to the transclusion count tool it's only used on ~1500 pages (currently).— V = IR (Talk • Contribs) 17:38, 31 March 2012 (UTC)
replies: text: Only 1500? Sounds like a lot of article to screw up, either deliberately or by accident.  Stepho  talk  10:53, 1 April 2012 (UTC)
replies: text: Yes, only. Compare 1500 with the 472103 transclusions of :Template:Convert or the 1554308 transclusions of :Template:Citation/core. Those are high-risk templates.— V = IR (Talk • Contribs) 15:08, 1 April 2012 (UTC)
thread_title:  Protection? 

message: The inflation/year feature uses up 33 of the 40 levels of "expansion depth" allowed by MediaWiki software.  This means if something like  is used in a template that itself has 7 levels of "expansion depth" surrounding the use of this template, the page will have problems.
Note that  uses 21 of these 33 levels.
I've updated the documentation.
The best solution would be to turn this or  or both into a module.  Other options include re-coding it to have less expansion depth.  davidwr/(talk)/(contribs) 22:45, 13 February 2020 (UTC)
replies: text: Since  is the more complex template and uses up more levels, I would choose that one to make into a module.  Stepho  talk  13:24, 14 February 2020 (UTC)
thread_title:  This needs a rewrite to reduce template expansion depth 

message: Could we add a parameter that'd allow input here to be formatted using ?  talk 19:38, 21 September 2020 (UTC)
replies: text: If this is done, care must be taken not to increase the "expansion depth" until the issues from February are eliminated, or it could cause problems on some pages that use the template.  Whoever does this please please please test it out in a sandbox and compare the "template expansion depth" to make sure it doesn't "cost" a layer under any circumstances.  In the alternative, address the issues raised in February first.  davidwr/(talk)/(contribs) 20:08, 21 September 2020 (UTC)

text: That would be great, because I constantly refer to how I optimized it in the lead of Great Flood of 1951. — Smuckola(talk) 08:49, 7 August 2022 (UTC)
thread_title:  Integration with [[Template:Format price]]? 

message: This template always uses the US inflation index. For some things one has to use the US-GDP index. Trigenibinion (talk) 01:25, 21 December 2020 (UTC)
thread_title:  Index 

message: On Nintendo_64_Game_Pak#Manufacturing_cost, please let me know if you think that my inflation calculation prose is ok, because inflation is important to a section about comparing many intricate costs at a certain historical mark. I mean, with a list of numerous prices like that, I just abbreviated it as direct parentheses without the repeated "equivalent to". But I reiterated the full statement with each paragraph. Kind of like how I do "long=yes" at the first instance in a whole article. The inflation calculator template policy is very against original research in numbers but it doesn't give examples on how to do this. Shouldn't there be an argument added to Template:US$ to eliminate "equivalent to" for this case? Or to change the accessory text, like we have in Template:As of so it doesn't only output "as of".  — Smuckola(talk) 08:47, 7 August 2022 (UTC)
thread_title: Prose for repeated prices

message: Merge from sandbox, add showyear=yes parameter,
:
to show the year of the currency between the amount and the conversion e.g.
:US$100 in 1950 (equivalent to $1,126 in 2021).
instead of
:US$100 (equivalent to $1,126 in 2021). 
for better sentence structuring in specific cases. — TheThomanski | t | c | 00:40, 27 December 2022 (UTC)
replies: text: — Mdaniels5757 (talk • contribs) 17:23, 28 December 2022 (UTC)
thread_title:  Template-protected edit request on 27 December 2022 

message: Should the minus sign be placed before (-$1) or after ($-1) the dollar sign? 79.185.136.221 (talk) 21:23, 29 December 2022 (UTC)
replies: text: WP doesn't seem to have an explicit policy on this but various style guides recommend, for US dollars, that the negative sign goes first. Other currencies may differ. See https://learn.microsoft.com/en-us/globalization/locale/currency-formatting .  puts the dollar sign first - although this may have been arbitrary choice. You should try to avoid negative amounts if possible - eg "the company made a loss of $1,000,000" instead of "the yearly profits were -$1,000,000".  Stepho  talk  00:32, 30 December 2022 (UTC)
thread_title:  minus sign 

message: I've noticed that a lot of articles that use this template with more than just numbers are part of this category. Ex: 200 Pounds Beauty, which has 
Is there any way to prevent this from being labeled as a non-numeric formatnum argument without messing up how it looks? All I can think of is replacing the aforementioned text with ,013,016
but it might look awkward in source mode. - OpalYosutebito (talk) 01:47, 23 March 2024 (UTC)
thread_title:  Pages with non-numeric formatnum arguments?