1 Formatter

The Formatter object is a subclass of ResultSet LocaleFormatter, the class used to localize database objects (numbers, dates, ...) to specific user locale.

You can create an instance of this class for a specific locale (and country) and use it to format objects.

var lf_us = new Ax.util.locale.Formatter("us");
var lf_es = new Ax.util.locale.Formatter("es");

// format(value, sqltype, scale)
// sqltype is ignored except for some date types
console.log(lf_es.format(123.92, null, 2));
console.log(lf_us.format(123.92, null, 2));

console.log(lf_es.format(new Ax.sql.Date()));
console.log(lf_us.format(new Ax.sql.Date()));
13 ene. 2020 16:18:29
2020 Jan 13 16:18:29