[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Currency formatting fix for DecimalFormat
From: |
Michael Koch |
Subject: |
Re: [cp-patches] Currency formatting fix for DecimalFormat |
Date: |
Thu, 30 Dec 2004 11:52:51 +0100 |
User-agent: |
KMail/1.6.2 |
Am Donnerstag, 30. Dezember 2004 01:05 schrieb Andrew John Hughes:
> Hi all,
> Attached is a patch which hopefully corrects most formatting of
> currencies. java.text.DecimalFormat is now linked to
> java.util.Currency for retrieving currency symbols correctly. Part
> of this patch (from Michael) also adds these currency symbols to
> our locale information, and their retrieval to java.util.Currency.
> Any additions to the rather short list are welcome, as are ideas
> for sources (preferably ones that can be automated) for this
> information. We also support variable currency symbol formatting
> using a format found in the CLDR sources. This is used for Indian
> rupees, where values between 0 and 1 are formatted differently.
>
> 2004-12-29 Andrew John Hughes <address@hidden>
>
> * gnu/java/locale/LocaleInformation.java
> Additional currency symbols.
> * java/text/DecimalFormat.java
> Correction of authorship < to (.
> (scanFix): removed currency changes
> (DecimalFormat()): documentation
> (DecimalFormat(String)): documentation
> (DecimalFormat(String, DecimalFormatSymbols): documentation
> (formatInternal(double,FormatBuffer,FieldPosition)): added
> currency substitution (apologies for reformatting).
> (format(long,FormatBuffer,FieldPosition): ditto
> (parse(String)): corrected compile warning (naming of
> multiplier) (substituteCurrency(String,double)): new method
> * java/text/DecimalFormatSymbols.java
> Correction of authorship < to (.
> (safeGetString): documentation
> (DecimalFormatSymbols()): currency uses java.util.Currency
> (setCurrency(java.util.Currency)): changes currency symbol
> and intl. currency symbol
> (setInternationalCurrencySymbol(String)): sets currency
> symbol on basis of change
> * java/text/NumberFormat.java
> Correction of authorship < to (.
>
> 2004-12-29 Michael Koch <address@hidden>
>
> * gnu/java/locale/LocaleInformation.java
> Addition of currency code to symbols mapping.
> * java/util/Currency.java
> (Currency()): added symbol retrieval
> (getSymbol()): implemented
Sorry, I was a bit too fast. I just found out that the fractionDigits
for some (all?) currencies are not taken into account. E.g. TR uses
fractionDigits of 0 (and not 2,the default).
Michael
--
Homepage: http://www.worldforge.org/