Comments on: JavaScript number-formatting library updated http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/ Stay curious! Thu, 02 May 2013 12:36:53 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Nicolas De Loof http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13516 Nicolas De Loof Thu, 11 Oct 2007 09:15:38 +0000 http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13516 that would also be nice to configure the group and decimal symbol beeing used. As a french user, I’m using “,” for decimals and ” ” for hundreds.

]]>
By: Nicolas De Loof http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13515 Nicolas De Loof Thu, 11 Oct 2007 08:26:43 +0000 http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13515 I can’t include your GPL code in an APACHE licensed project, as GPL requires me to license my work under GPL… For same reason I can dual license as the only license compatible with GPL is … GPL.

Fyi, APACHE/BSD/MIT licenses are recognized free software licenses taht allow the code to be included in any software (even commercial) with the only restriction NOT to use the author name as a trademark, and to keep in source code the original copyright notices.

The issue with “0″ is for formating 4 -> “4″ and 4.1 -> “4.1″ with the same pattern. From your test cases :

-> 4.5, “0.00″, “4.50″, // OK : fixed number of decimals
-> 4, “0.#”, “4.0″, // I expected : “4″ # should be for optional

]]>
By: Xaprb http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13511 Xaprb Wed, 10 Oct 2007 16:50:38 +0000 http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13511 It’s possible it may conflict with Prototype. I have not kept up with Prototype.

I don’t have time to look into the details of licensing right now, and I would need to understand the other licenses deeply to make that decision. You could dual-license your project if you wish.

I’m unclear from your description whether the 0′s are necessary. If you don’t want them, you can use “#.” instead, right? What use case doesn’t the existing behavior support? It’s supposed to be compatible with existing standards, so if it’s not, a test case and patch would be great.

]]>
By: Nicolas De Loof http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13510 Nicolas De Loof Wed, 10 Oct 2007 15:34:01 +0000 http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13510 I just discovered that both “#.0000″ and “#.####’ format 4 as “4.0000″. Is there any way to avoid those unecessary 0

]]>
By: Nicolas De Loof http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13509 Nicolas De Loof Wed, 10 Oct 2007 14:24:26 +0000 http://www.xaprb.com/blog/2007/06/19/javascript-number-formatting-library-updated/#comment-13509 Hello,

your number formatting helped me lot. I just have two considerations :

- about licensing, could you double license it under LGPL and BSD/MIT or APACHE ? I’m writing an Apache-licensed project, and cannot integrate your lib as is due to licensing considerations.

- did you test your lib with Prototype ? I didn’t tested myself but I thing it may conflict with http://www.prototypejs.org/api/number.

]]>