Incorrect result with negative 7-digit number from fn:format-number()

Friday, 13 October 2017 · 3 messages · last reply 17 Oct 2017
CG
Christian Grünin reply to Andrew Savikas, 13 Oct 2017, 02:2013 Oct 2017 00:47 #
Dear Andrew, Yes, looks like a bug. We’ll look at this soon [1]. Best, Christian [1] https://github.com/BaseXdb/basex/issues/1506
Quoted text · Andrew Savikas · 22 lines
On Fri, Oct 13, 2017 at 12:19 AM, Andrew Savikas <andrew at 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!
AS
Andrew Savikas13 Oct 2017 02:20 #
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!
CG
Christian Grün17 Oct 2017 10:04 #
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/
Quoted text · Andrew Savikas · 22 lines
On Fri, Oct 13, 2017 at 12:19 AM, Andrew Savikas <andrew at 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!

⚡Generated with XQuery