Large numbers (over 1 million) are not properly parsed in javascript

9 views
Skip to first unread message

Alexander Obuhovich

unread,
Aug 31, 2010, 10:50:00 AM8/31/10
to In-Portal Bugs
In-Portal has javascript class called NumberFormatter, that allows to format/parse any number to have decimal and thousands separator in proper places, e.g. "54434343.22" will be "54,434,343.22" in formatted case. Method Format is responsible for that.

Method Parse fails to parse string from example above resulting only first comma to be replaced and not all of them.

Task: http://tracker.in-portal.org/view.php?id=844

Ready for testing.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
js_number_parsing_fails_on_large_numbers.patch
Reply all
Reply to author
Forward
0 new messages