Is there a money data type? If not, any plans to add it in the future?
Thanks
Thanks
isc.SimpleType.create({ name:"currency",inheritsFrom:"float", normalDisplayFormatter: function(value) { return this.shortDisplayFormatter(value); }, shortDisplayFormatter: function(value) { // US currency formatter from http://javascript.internet.com/forms/currency-format.html if (value==undefined) return value; else { value = value.toString().replace(/\$|\,/g,''); if(isNaN(value)) value = "0"; sign = (value == (value = Math.abs(value))); value = Math.floor(value*100+0.50000000001); cents = value%100; value = Math.floor(value/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((value.length-(1+i))/3); i++) value = value.substring(0,value.length-(4*i+3))+','+ value.substring(value.length-(4*i+3)); return (((sign)?'':'-') + '$' + value + '.' + cents); } } });
Comment