+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Does anyone know how to format currency

Hybrid View

  1. #1

    Does anyone know how to format currency

    Does anyone know how to make price in flynax show:

    $1,000 shows as $1k
    or $1,500 shows as $1.5k

    $1,000,000 shows as $1m
    $1,500,000 shows as $1.5m

    Similarly to billion
    $1,000,000,000 shows as $1b

  2. #2
    Any clue how to?

    I found this script but have no idea how to implement it to flynax price. Have tried a few methods but no luck so far

    http://numeraljs.com/

  3. #3
    Any idea guys,
    How to use this script for flynax price?

    http://numeraljs.com/

  4. #4
    Seems quite a large script just to change the way currency displays, best way i would have thought is just set up a php function and call that
    something like:

    function numDifferentiation(val) {
    if(val >= 1000) val = (val/1000).toFixed(2) + ' K';
    return val;
    }

  5. #5
    Quote Originally Posted by Paul Webb View Post
    Seems quite a large script just to change the way currency displays, best way i would have thought is just set up a php function and call that
    something like:

    function numDifferentiation(val) {
    if(val >= 1000) val = (val/1000).toFixed(2) + ' K';
    return val;
    }
    It does look a lot simpler but would you please guide me how to apply this? A script above can serve alot of other functions though, even time format

  6. #6
    Quote Originally Posted by Wei Hong View Post
    It does look a lot simpler but would you please guide me how to apply this? A script above can serve alot of other functions though, even time format
    There should already be a function built in as i have just looked at my show on map page and the prices are in the format you require, when i get 10 mins will see if i can find it.

  7. #7
    Quote Originally Posted by Paul Webb View Post
    There should already be a function built in as i have just looked at my show on map page and the prices are in the format you require, when i get 10 mins will see if i can find it.
    Much appreciate for your helping :-(

  8. #8
    I'm still looking for this. Please help

  9. #9
    Hello Wei,

    It is not so difficulty but what should show it price will be $1525 - $1.5k, $1,530,000 - $1.5m or some other format? Would you please explain better?
    Viktor,
    Flynax technical department,
    Best wishes.

  10. #10
    Quote Originally Posted by Viktor View Post
    Hello Wei,

    It is not so difficulty but what should show it price will be $1525 - $1.5k, $1,530,000 - $1.5m or some other format? Would you please explain better?
    Hi Viktor,

    Thank you for replying.
    For $1,525, I would like to have 1.525 k
    So: $1,530,000 - $1.530 m
    Or $1,599,000,000 - 1.599 b

+ Reply to Thread