Incorrect result with negative 7-digit number from fn:format-number()
Hello, I'm struggling with some odd behavior while trying to format currency amounts. When the number is negative and 7-digits long, the picture string is not working properly. You should (I hope!) be able to replicate the issue in the GUI: format-number(-999999, "$#,##0") *Result:* -$999,999 <-- Expected Result format-number(-9999999, "$#,##0") *Result:* -$9999,999 <-- *Comma is in the wrong place* format-number(-99999999, "$#,##0") *Result:* -$99,999,999 <-- Expected Result Am I missing something here? Thank you!
Dear Andrew, Yes, looks like a bug. We’ll look at this soon [1]. Best, Christian [1] https://github.com/BaseXdb/basex/issues/1506 On Fri, Oct 13, 2017 at 12:19 AM, Andrew Savikas <andrew@crowdfilings.com> wrote:
Hello,
I'm struggling with some odd behavior while trying to format currency amounts. When the number is negative and 7-digits long, the picture string is not working properly.
You should (I hope!) be able to replicate the issue in the GUI:
format-number(-999999, "$#,##0") Result: -$999,999 <-- Expected Result
format-number(-9999999, "$#,##0") Result: -$9999,999 <-- Comma is in the wrong place
format-number(-99999999, "$#,##0") Result: -$99,999,999 <-- Expected Result
Am I missing something here?
Thank you!
Hi Andrew, The format-number issue has been fixed [1,2]. Thanks for reporting the bug, Christian [1] https://github.com/BaseXdb/basex/issues/1506 [2] http://files.basex.org/releases/latest/ On Fri, Oct 13, 2017 at 12:19 AM, Andrew Savikas <andrew@crowdfilings.com> wrote:
Hello,
I'm struggling with some odd behavior while trying to format currency amounts. When the number is negative and 7-digits long, the picture string is not working properly.
You should (I hope!) be able to replicate the issue in the GUI:
format-number(-999999, "$#,##0") Result: -$999,999 <-- Expected Result
format-number(-9999999, "$#,##0") Result: -$9999,999 <-- Comma is in the wrong place
format-number(-99999999, "$#,##0") Result: -$99,999,999 <-- Expected Result
Am I missing something here?
Thank you!
participants (2)
-
Andrew Savikas -
Christian Grün