GithubHelp home page GithubHelp logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
[deleted comment]

from jquery-numberformatter.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
I got the same problem.

As a workaround i added an additional option to the format-function, which 
indicates,
that the containing value is to be interpreted as a javascript number-value.

        if(options.raw != true) {
            // now we need to convert it into a number
            while (text.indexOf(group)>-1)
                   text = text.replace(group,'');
            var number = new Number(text.replace(dec,".").replace(neg,"-"));
        } else {
            var number = new Number(text);
        }

but this is truely a workaround. I would have expected that if the value is a 
valid
number, no textreplacements will be made.

Original comment by [email protected] on 4 Dec 2009 at 8:57

from jquery-numberformatter.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
Your right, shouldn't really be parsing the number before formatting, if you 
want to do 
that then of course you can via 2 separate calls (parse -> js num -> formatted 
text).

I'm going to change things to try and separate parsing and formatting more, for 
the 
next version.

Original comment by [email protected] on 4 Feb 2010 at 6:33

  • Changed state: Accepted

from jquery-numberformatter.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
Fixed for 1.2

now works fine via

$('span').formatNumber({format:"#,##0.00 EUR", locale:"de"});

Original comment by [email protected] on 29 Apr 2010 at 4:36

  • Changed state: Fixed

from jquery-numberformatter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.