https://bugzilla.wikimedia.org/show_bug.cgi?id=40386

Vera <v.pel...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |v.pel...@gmail.com

--- Comment #7 from Vera <v.pel...@gmail.com> 2012-10-14 13:25:17 UTC ---
If we want to use expr we must transform number into decimal dot system.
Problem are numbers bigger than 1000 without thousand dot separator.

Use of extension {{#formatnum:number|number of decimals|decimal
separator|thousand separator|old thousand separator}} or
{{#formatnum:number|decs=number of decimals|dsep=decimal
separator|tsep=thousand separator|otsep=old thousand separator|format=DIN or
ISO|mint=minimal number to seperate thousands}} works fine for us (you can
check this in http://www.wecowi.de/index.php?title=WeCoWi:Spielwiese)
{{#formatnum: 2300,123|2|.||otsep=.}} → 2300.12
{{#formatnum: 2300|2|.||otsep=.}} → 2300.00
{{#formatnum: 2.300|2|.||otsep=.}} → 2300.00 
{{#formatnum: 1.234.567,89|2|.||otsep=.}} → 1234567.89 
{{#formatnum: 6,0|2|.||otsep=.}} → 6.00
{{#formatnum: 6,1|2|.||otsep=.}} → 6.10 
{{#formatnum: 5|2|.||otsep=.}} → 5.00
{{#formatnum: 10000|2|.||otsep=.}} → 10000.00
{{#formatnum: 10.000|2|.||otsep=.}} → 10000.00 
{{#expr: {{#formatnum:10000|2|.||otsep=.}}/{{#formatnum:10|2|.||otsep=.}}}} →
1000
{{#expr: {{#formatnum:6,0|2|.||otsep=.}}/{{#formatnum:2,5|2|.||otsep=.}}}} →
2.4 

Current use of formatnum on sl wiki (decimal comma and thousands dot
separator):
*{{formatnum: 2300,123}} → 2.300.123 (????)
*{{formatnum: 2300}} → 2.300  (????)
*{{formatnum: 2.300}} → 2,300 (ok)
*{{formatnum: 1.234.567,89}} → 1,234,567.89 (ok)
*{{formatnum: 6,0}} → 6.0 (ok)
*{{formatnum: 6,1}} → 6.1 (ok)
*{{formatnum: 5}} → 5  (ok)
*{{formatnum: 10000}} → 10.000 (????)
*{{formatnum: 10.000}} → 10,000 (ok)
*{{#expr: {{formatnum:10000}}/{{formatnum:10}}}} → 1   (????)
*{{#expr: {{formatnum:6,0}}/{{formatnum:2,5}}}} → 2.4  (ok)

After calculation we must transform the calculated number back into decimal
comma system:
*formatnum:{{#expr: {{formatnum:6,0}}/{{formatnum:2,5}}}} result: 2,4
*formatnum:{{#expr: {{formatnum:5}}/{{formatnum:2}}}} result: 2,5
*formatnum:{{#expr: {{formatnum:10000}}/{{formatnum:10}}}} result: 1 (????)

If there is any other simple solution for our calculation problems instead of
FormatNum extension ..... for now I just want to calculate population density.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to