money2 1.4.0-beta-1 money2: ^1.4.0-beta-1 copied to clipboard
Money and Currency classes with fixed precision maths, parsing and formating. (Money.parse("$2010.00") * 10).format("S CC#,##0") -> $ US20,100
Change Log #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
version: 1.4.0-beta-1 #
Added support for whitespace around the symbol and the currency code. Added support for a builtin list of common currency codes as requested in #8
version: 1.3.0 #
Fixes from oysterpack dealing with: https://github.com/noojee/money.dart/issues/4 money values with single digit cents do not format correctly
and
https://github.com/noojee/money.dart/issues/2
Currently minor units and currency are used to construct Money, but they are not exposed as properties.
version: 1.2.3 #
Updated code style to meet latest requirements of dartanalyzer.
version: 1.2.2 #
Documented creation of top 20 currencies.
version: 1.2.1 #
Corrections and improvements to the documentation.
version: 1.2.0 #
Deprecated 'fromString' methods in favour of 'parse' method name. This was done to bring the library in line with the likes of BigInt.parse.
Added #
New 'Money.from(num)' method to support creating money from int's and doubles. New Unit tests for Money.from and the new parse methods.
Deprecated #
Money.fromString - use Money.parse Currency.fromString - use Currency.parse Currencies.fromString - use Currencies.parse
version: 1.1.1 #
Minor documenation cleanups.
version: 1.1.0 #
Change the API of Currencies. Its now a singleton so usage changes from: Currencies().register() to Currencies.register().
Added #
New methods to parse a monetary value from a String including: Money.frommString Currency.fromString Currencies.fromString
New method to convert a [Money] of one currency to another currency via the [Money.exchangeTo] method.
New examples and unit tests for the above methods.
version: 1.0.7 #
2nd Attempt to improve the description displayed on pub.dev.
version: 1.0.6 #
Attempt to improve the description displayed on pub.dev.
version: 1.0.5 #
Formatting of examples as the pub.dev site clips wide lines.
version: 1.0.4 #
Improved the examples.
version: 1.0.3 #
Changed readme sample to the more familar usd.
Added #
Examples of registry usage.
Additional unit tests.
version: 1.0.2 #
tweaks to the doco, some additional unit tests. Improved the trailing zero logic.
version: 1.0.1 #
Improvemenst to the dartdoc.
version: 1.0.0 #
First release version
Updated #
Readme to document invertedSeparators and general improvments corrections.
Added #
Added a couple additional examples. InvertedSeparator argument to Currency.create Additional unit test for the InvertedSeparator option.
version: 1.0.0-beta.6 #
Minor cleanups of the readme.md
version: 1.0.0-beta.5 #
Updated the name of example.dart to please google package gods.
version: 1.0.0-beta.4 #
Update to please the google package gods.
Added #
- longer description
- fixed to broken annotations.
version: 1.0.0-beta.3 #
Updated the description.
Removed #
- Dependency on
meta ^1.1.7
.
Updated #
- Dependancy on
intl: ^0.16.0
.
1.0.0-beta.1 - 2019-9-26 #
Added #
- Dependency on
meta ^1.1.7
. - Dependancy on
intl: ^0.15.8
. - Annotations
@immutable
and@sealed
toMoney
,Currency
,MoneyData
. - Added new format method on Money class to allow simply formating of amounts.
- Modified the API to make it easier to follow.
- Change the Currencies class to a factory and renamed methods to 'register' and 'registerList'.
- Chaneged ctor for Money from withBigInt to fromBigInt
- Added ctor for Money 'fromInt'
- Added strong mode to the analyzer.
- Renamed a number of classes for clarity.
- Added unit tests for the new formatter.
- Updated the readme.md for clarity and the details on the new formatter.
- Removed the aggregated currency interface as couldn't see that it added significant value.
1.0.0-alpha.1 - 2019-04-09 #
This release was made from scratch and provides API incompatible with
0.2.1
.
Added #
Currency
value-type.- The interface
Currencies
for representation of currency directories. - Implementation of currencies which can be initialized by any
Iterable<Currency>
(see the factoryCurrencies.from(Iterable<Currency>)
). - Aggregating
Currencies
implementation (see the factoryCurrencies.aggregating(Iterable<Currencies>)
). - Adds
Money
value-type:- amount predicates:
.isZero
,.isPositive
,.isNegative
; - currency predicates
.isInCurrency(Currency)
,.isInSameCurrencyAs(Money)
; - comparison operators:
==
,<
,<=
,>
,>=
; - conformance to
Comparable<Money>
; - arithmetic operators (
+(Money)
,-(Money)
,*(num)
,/(num)
); - allocation according to ratios with
.allocationAccordingTo(List<int>)
; - allocation to N targets with
.allocationTo(int)
; .encodedBy(MoneyDecoder)
;Money.decoding(MoneyEncoder)
.
- amount predicates:
- Interface
MoneyEncoder
. - Interface
MoneyDecoder
. MoneyData
— DTO for encoding/decoding.
0.1.5 - 2016-07-06 #
0.1.4 - 2016-06-03 #
0.1.1 - 2015-05-04 #
Added #
- Added
Money.fromString()
constructor. - Added relational operators (
<
,<=
,>
,>=
).
[0.1.0] - 2015-05-01 #
Initial version.