/
index.xml
112 lines (96 loc) · 3.92 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0"?>
<document>
<properties>
<title>Joda Money</title>
<author>Stephen Colebourne</author>
</properties>
<body>
<section name="Joda Money">
<p>
Joda-Money provides a library of classes to store amounts of money.
</p>
<p>
Joda-Money does not provide, nor is it intended to provide, monetary algorithms beyond the most basic and obvious.
This is because the requirements for these algorithms vary widely between domains.
This library is intended to act as the base layer, providing classes that should be in the JDK.
</p>
<p>
As a flavour of Joda-Money, here's some example code:
<source>
<span class="comment">// create a monetary value</span>
<a href="apidocs/org/joda/money/Money.html">Money</a> money = Money.parse("USD 23.87");
<span class="comment">// add another amount with safe double conversion</span>
<a href="apidocs/org/joda/money/CurrencyUnit.html">CurrencyUnit</a> usd = CurrencyUnit.of("USD");
money = money.plus(Money.of(usd, 12.43d));
<span class="comment">// subtracts an amount in dollars</span>
money = money.minusMajor(2);
<span class="comment">// multiplies by 3.5 with rounding</span>
money = money.multipliedBy(3.5d, RoundingMode.DOWN);
<span class="comment">// compare two amounts</span>
boolean bigAmount = money.isGreaterThan(dailyWage);
<span class="comment">// convert to GBP using a supplied rate</span>
BigDecimal conversionRate = ...; <span class="comment">// obtained from code outside Joda-Money</span>
Money moneyGBP = money.convertTo(CurrencyUnit.GBP, conversionRate);
<span class="comment">// use a BigMoney for more complex calculations where scale matters</span>
<a href="apidocs/org/joda/money/BigMoney.html">BigMoney</a> moneyCalc = money.toBigMoney();
</source>
</p>
<p>
Users are reminded that this software, like all open source software, is <a href="license.html">provided</a>
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
</p>
<p>
Version 0.8 was released on 2013-01-30 -
<a href="https://sourceforge.net/projects/joda-money/files/joda-money/0.8/">Download now</a><br />
Joda Money is licensed under the business-friendly <a href="license.html">Apache 2.0 licence</a>.
</p>
</section>
<section name="Documentation">
<p>
Various documentation is available:
<ul>
<li>The helpful <a href="userguide.html">user guide</a></li>
<li>The javadoc for the <a href="apidocs/index.html">current release</a></li>
<!--li>A <a href="faq.html">FAQ</a> list</li-->
<!--li>Information on <a href="installation.html">downloading and installing</a> Joda-Money</li-->
<li>The <a href="https://github.com/JodaOrg/joda-money">GitHub</a> source repository</li>
</ul>
</p>
</section>
<section name="Releases">
<p>
There are no full releases yet!
<a href="https://sourceforge.net/projects/joda-money/files/joda-money/0.8/">Release 0.8</a>
is the current development release intended for feedback.
The code is fully tested, but there may yet be bugs and the API may yet change.
There should be no great reason why it cannot be used in production if you can cope with future API change.
</p>
<p>
There are no runtime dependencies beyond JDK 1.6.<br />
Joda-Money does have a <i>compile-time</i> dependency on Joda-Convert, but this is not required at runtime
thanks to the magic of annotations.
</p>
<p>
Available in the <a href="http://search.maven.org/#artifactdetails|org.joda|joda-money|0.8|jar">Maven Central</a>.
</p>
</section>
<section name="Support">
<p>
Support on bugs, library usage or enhancement requests is available on a best efforts basis via:
</p>
<p>
To suggest enhancements or contribute, please <a href="https://github.com/JodaOrg/joda-money">fork the source code</a> on GitHub.
Alternatively, use GitHub <a href="https://github.com/JodaOrg/joda-money/issues">issues</a>.
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
<br />
</p>
</section>
</body>
</document>