Scala currency and money libraries (JVM-based libraries)

I've been trying to find some good Scala currency and money libraries lately, and I found that nscala-money is a Scala wrapper around Joda Money.

A few years ago I found the following list of money/currency projects on the Joda Money Github project. That URL contains the following list of Java and JVM-based projects that should all be usable in Scala:

JScience - MoneyAmount, based on Javaloution classes
http://jscience.org/api/org/jscience/economics/money/MoneyAmount.html

JMoney - long directly
https://jmoney.svn.sourceforge.net/svnroot/jmoney/trunk/net.sf.jmoney/src/net/sf/jmoney/model2/

TimeAndMoney - Money class with currency scale (BigDecimal + JDK Currency)
http://timeandmoney.svn.sourceforge.net/viewvc/timeandmoney/timeandmoney/trunk/src/main/java/com/domainlanguage/money/Money.java?revision=340&view=markup

Money from Tom Gibara - Small library with good approach to calculation
http://www.tomgibara.com/projects/money/

JCash - BigDecimal directly
http://jcash.cvs.sourceforge.net/viewvc/jcash/jcash/src/jcash/

Eurobudget - double directly
http://eurobudget.cvs.sourceforge.net/viewvc/eurobudget/eurobudget/src/com/pjsofts/eurobudget/beans/

Java practices - Class based on BigDecimal
http://www.javapractices.com/topic/TopicAction.do?Id=13

Grails Currency Plugin - Class based on float
http://github.com/ricardojmendez/grails-currencies/blob/master/grails-app/domain/Money.groovy

OpenGamma CurrencyAmount - Class based on double (its an estimate)
https://github.com/OpenGamma/OG-Platform/blob/master/projects/OG-Util/src/com/opengamma/util/money/CurrencyAmount.java

Design document
http://www.objectivelogic.com/resources/Java%20and%20Monetary%20Data/Java%20and%20Monetary%20Data.pdf 

Also, although it may be a little dated, there's also this Scala Currency class, which can serve as a nice starting point.

Add new comment

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.