Number formatting?

Options

I would like to format the number outputs such as adding commas.

Tagged:

Comments

  • How about:

    <t:set id="prettyNum" value="numberFormat(-3794483.12739, "###,###,###.00)" />

    Average value of something negative: ${prettyNum}

    That would display as:

    Formatted value of something negative: -3,794383.00

    You can see all the options for the formatting string by reviewing the section on Special Pattern Characters in the Java DecimalFormat method. I'll make sure that nugget of goodness gets added to the .

  • Bruce Keilin:

    How about:

    <t:set id="prettyNum" value="numberFormat(-3794483.12739, "###,###,###.00)" />

    Average value of something negative: ${prettyNum}

    That would display as:

    Formatted value of something negative: -3,794383.00

    You can see all the options for the formatting string by reviewing the section on Special Pattern Characters in the Java DecimalFormat method. I'll make sure that nugget of goodness gets added to the .

    Awesome.

    Will it also be possible to do the following?



    <t:value id="my_num_value" type="number" format="###,###,###.00" />
  • Seamus Leahy:

    Awesome.

    Will it also be possible to do the following?



    <t:value id="my_num_value" type="number" format="###,###,###.00" />

    That is not possible today, but I like the idea. It certainly deserves a spot on .

Categories