[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Currency formatting fix for DecimalFormat
From: |
Andrew John Hughes |
Subject: |
[cp-patches] Currency formatting fix for DecimalFormat |
Date: |
Thu, 30 Dec 2004 00:05:09 +0000 |
User-agent: |
Mutt/1.5.6+20040907i |
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
--
Andrew :-)
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
No software patents in Europe -- http://nosoftwarepatents.com
"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman
"We've all been part of the biggest beta test the world has ever known --
Windows"
-- Victor Wheatman, Gartner
numberformat-02.diff
Description: Text document
signature.asc
Description: Digital signature
- [cp-patches] Currency formatting fix for DecimalFormat,
Andrew John Hughes <=