postate.com/programming/vb-format.html">here. We have made the following enhancements to this specification:
- if the international currency symbol (¤) occurs in a format string, it is translated to the locale's currency symbol.
- the format string "Currency" is translated to the locale's currency format string. Negative currency values appear in parentheses.
- the string "USD" (abbreviation for U.S. Dollars) may occur in a format string.
One format object can be used to format multiple values, thereby amortizing the time required to parse the format string. Example:
double[] values; Format format = new Format("##,##0.###;(##,##0.###);;Nil"); for (int i = 0; i < values.length; i++) { System.out.println("Value #" + i + " is " + format.format(values[i])); }
Still to be implemented:
- String formatting (fill from left/right)
- Use client's timezone for printing times.
@author jhyde
@version $Id: //open/mondrian-release/3.2/src/main/mondrian/util/Format.java#10 $