handling country specific fomatted numbers/floats
Hi there
I have a form with a target value and some actual values (precison 1). I have to calculate the % for the actuals compared to target. would not be a problem but
the values are displayed formatted. here in Switzerland we use ',' as decimal sign and '.' for the grouping.
1.500,5 is of course NaN to JavaScript, so is 10,5
It would be nice to have a little util plugin, which allows calculations with country specific formatted numbers.
Has anybody already overcome this problem?
I'm not that strong in JavaScript and RegExp, but I think for a crack this would be piece of chocolate-cake
Thanks:-)
Need to fill ??,?%
Target Value: 1.500,3
Actual Q1 900,3 ??,?%
Actual Q2 1.200,4 ??,?%
Actual Q3 1.300,0 ??,?%
Actual Q4 1.800,5 ??,?%