Global.Number.prototype.format (fmt)
format a Number to a String

  • Parameter String:
    Format pattern
  • Returns
    String Number formatted to a String FIXME: this might need some localisation
Sourcecode in /home/hannes/helma/modules/core/Number.js:
42:   Number.prototype.format = function(fmt) {
43:       var df = fmt ? new java.text.DecimalFormat(fmt)
44:                    : new java.text.DecimalFormat("###,##0.##");
45:       return df.format(0 + this); // addition with 0 prevents exception
46:   }