Skip to main content
This revision made August 06, 2012 15:02, by keilw

Java Currency and Money API Wiki

Target markets
Scope
Design Principles
Precision
Requirements
Implementation notes
Use Cases

GitHub Repository

Caveat Emptor

  • This JSR will not satisfy everyone
  • Goal is 80% of use cases for the 9+ million JVM developers

External Links
JFire Accounting and JFire Currency Interface for reasons similar to those Stephen outlines below, JFire uses long directly, holding the "minor" amount, formatting it to the necessary representation
MoneyDance API for reasons similar to those Stephen outlines, MoneyDance API long directly, holding the "minor" amount. All formatting or currency exchange is done accordingly.
Joda Money can be referred to as an inspiration for API and design style. it is based on real-world use cases in an e-commerce application for airlines
(must be from a small or US airline, as there is no currency conversion;-) Note from Joda author Stephen Colebourne - my current company wants estimated amounts at high performance, so uses double directly
Grails Currencies uses BigDecimal as internal representation, but API only exposes Number in all Money operations like plus(), minus() or similar.
ICU4J Uses Number for all operations and internal storage in its Money type.
Why not to use BigDecimal for Money
M-Pesa-Mobile Money in Africa
Currency Internationalization (i18n), Multiple Currencies and Foreign Exchange (FX).
http://en.wikipedia.org/wiki/Japanese_units_of_measurement#Money
Discussion of internationalization of currencies, rounding, grouping and formatting, separators etc]
http://speleotrove.com/decimal/http://sourceforge.net/projects/oquote/ Speaking of Insurance, one of my UK colleagues here at Maersk is co-contributor to this SF project: It has an interesting Currency and CurrencyAmount structure in it, too. Maybe a good inspiration, and given it is aimed at the UK and International Insurance industry, it sounds like a welcome project to get in touch with. Contains specifications for decimal floating point arithmetic-Werner Keil
Karatsuba Algorithm for Fast Big Decimal Multiplication

Related Initiatives
Eric Evans Time and Money Library

Difference compared to previous revision
[http://moneydance.com/dev/apidoc/index.html MoneyDance API] for reasons similar to those Stephen outlines, MoneyDance API '''long''' directly, holding the "minor" amount. All formatting or currency exchange is done accordingly.
[http://joda-money.sourceforge.net/ Joda Money] can be referred to as an inspiration for API and design style. it is based on real-world use cases in an e-commerce application for airlines
(must be from a small or US airline, as there is no currency conversion;-) Note from Joda author Stephen Colebourne - my current company wants estimated amounts at high performance, so uses '''double''' directly
[https://gi '''Java Currency and Money API Wiki''' [[TargetMarkets|Target markets]]
[[Scope]]
... [http://moneydance.com/dev/apidoc/index.html MoneyDance API] for reasons similar to those Stephen outlines, MoneyDance API '''long''' directly, holding the "minor" amount. All formatting or currency exchange is done accordingly.
[http://joda-money.sourceforge.net/ Joda Money] can be referred to as an inspiration for API and design style. it is based on real-world use cases in an e-commerce application for airlines
(must be from a small or US airline, as there is no currency conversion;-) Note from Joda author Stephen Colebourne - my current company wants estimated amounts at high performance, so uses '''double''' directly
[http://thenextwethub.com/africa/2012/02/05/learning-frb.com/ricardojom-kenymendez/gra-mobileails-mocurrenciney-tes Granilsfe Cur-and-co-wokirreng-spancices/?awes] us BigDeciesm=mal as intertnw.nal representatito_1DEWIon, M-but API only Pesa-Mexposes '''Number''' in aobilell Money operations Money in Af like ''plus()'', ''minus()'' or sricimila] r.
[https://g
[http://withubki.eclipse..comorg/ICU4J ICU4J] Uses '''Numbe/ricar''' fod all ojmpendez/geratrailions-curre ancd inties Gernrails Cual storrage iencn iets]s Money type.
[http://lemnik.wordpress.com/2011/03/25/bigdecimal-and-your-money/ Why not to use BigDecimal for Money]
[http://thenextweb.com/africa/2012/02/05/learning-from-kenya-mob
[http://lemnik.wordpress.com/2011/03/25/bigdecimal-and-your-money/ Why not to use BigDecimal for Money]
[http://wiki.ile-money-transfer-and-eclco-working-spaces/?awesm=tnw.tipse.org/o_1DEWICU4J ICU4JI M-Pesa-Mobile Money in Africa]
[http://www.xencraft.com/resources/multi-currency.html Currency Internationalization (i18n), Multiple Currencies and Foreign Exchange (FX).
[http://en.wikipedia.org/wiki/Japanese_units_of_measurement#Money]
Discussion of internationalization of currencies, rounding, grouping and formatting, separators etc]
 
 
Close
loading
Please Confirm
Close