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

Visto 9 veces
Saltar al primer mensaje no leído

Alexander Obuhovich

no leída,
31 ago 2010, 10:50:0031/8/10
a 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
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos