Joda-Money

Money representation and formatting

Лицензия

Лицензия

Группа

Группа

org.joda
Идентификатор

Идентификатор

joda-money
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Joda-Money
Money representation and formatting
Ссылка на сайт

Ссылка на сайт

http://www.joda.org/joda-money/
Организация-разработчик

Организация-разработчик

Joda.org
Система контроля версий

Система контроля версий

https://github.com/JodaOrg/joda-money

Скачать joda-money

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.joda/joda-money/ -->
<dependency>
    <groupId>org.joda</groupId>
    <artifactId>joda-money</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.joda/joda-money/
implementation 'org.joda:joda-money:1.0.1'
// https://jarcasting.com/artifacts/org.joda/joda-money/
implementation ("org.joda:joda-money:1.0.1")
'org.joda:joda-money:jar:1.0.1'
<dependency org="org.joda" name="joda-money" rev="1.0.1">
  <artifact name="joda-money" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.joda', module='joda-money', version='1.0.1')
)
libraryDependencies += "org.joda" % "joda-money" % "1.0.1"
[org.joda/joda-money "1.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.joda : joda-convert Необязательный jar 2.1.1

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
com.tngtech.java : junit-dataprovider jar 1.10.0

Модули Проекта

Данный проект не имеет модулей.

Joda-Money

Joda-Money provides a library of classes to store amounts of money.

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.

As a flavour of Joda-Money, here's some example code:

// create a monetary value
Money money = Money.parse("USD 23.87");

// add another amount with safe double conversion
CurrencyUnit usd = CurrencyUnit.of("USD");
money = money.plus(Money.of(usd, 12.43d));

// subtracts an amount in dollars
money = money.minusMajor(2);

// multiplies by 3.5 with rounding
money = money.multipliedBy(3.5d, RoundingMode.DOWN);

// compare two amounts
boolean bigAmount = money.isGreaterThan(dailyWage);

// convert to GBP using a supplied rate
BigDecimal conversionRate = ...;  // obtained from code outside Joda-Money
Money moneyGBP = money.convertedTo(CurrencyUnit.GBP, conversionRate, RoundingMode.HALF_EVEN);

// use a BigMoney for more complex calculations where scale matters
BigMoney moneyCalc = money.toBigMoney();

Users are reminded that this software, like all open source software, is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.

Joda-Money is licensed under the business-friendly Apache 2.0 licence.

Documentation

Various documentation is available:

Releases

Release 1.0.1 is the current release. This release is considered stable and worthy of the 1.x tag. It depends on Java SE 8 or later.

Joda-Money does have a compile-time dependency on Joda-Convert, but this is not required at runtime thanks to the magic of annotations.

Available in the Maven Central repository

Tidelift dependency check

For enterprise

Available as part of the Tidelift Subscription.

Joda and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.

If you want the flexibility of open source and the confidence of commercial-grade software, this is for you.

Learn more

Support

Please use Stack Overflow for general usage questions. GitHub issues and pull requests should be used when you want to help advance the project.

Any donations to support the project are accepted via OpenCollective.

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Release process

  • Update version (README.md, index.md, changes.xml)
  • Commit and push
  • mvn clean release:clean release:prepare release:perform
  • git fetch
  • Website will be built and released by GitHub Actions
org.joda

Joda.org

Версии библиотеки

Версия
1.0.1
1.0
0.90
0.12
0.11
0.10.0
0.9.1
0.9
0.8
0.7
0.6