mardi 21 avril 2015

Format a double without decimals & adding commas for thousands in Scala Java Play framework

I have doubles such as:



I want to output them as:



I found the following solution:


This was with the help of:

how to format a number/date in play 2.0 template?

What is the proper way to format a double in a Play 2 template

I'd like to replace this shameless solution by something more clean. Chopping off those decimals using a .replace() method is really not pretty.

Aucun commentaire:

Enregistrer un commentaire