Skip to content

Commit a66171d

Browse files
committed
Merge branch 'main' of https://github.com/kipcole9/money
2 parents d13bdf4 + 72740cf commit a66171d

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This is the changelog for Money v5.24.0 released on January 18th, 2026. For old
3030

3131
### Enhancements
3232

33-
* Add `Money.spread/3` to proptionally allocate (that is, spread) am money amount amongst a list of amounts or integers. Thanks to @jdewar for the PR and great patience. Closes #175.
33+
* Add `Money.spread/3` to proportionally allocate (that is, spread) a money amount amongst a list of amounts or integers. Thanks to @jdewar for the PR and great patience. Closes #175.
3434

3535
* Add support for custom currency codes. A custom currency code is created with `Cldr.Currency.new/2` and is distinguised from an ISO4217 code by being at least 4 characters long (ISO4217 codes are always 3 characters long). The first character must be a Latin alphabetic character. The additional characters must be Latin alphanumeric characters.
3636

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ Therefore an error is returned if an attempt is made to use `Money.new/2` with a
395395

396396
{:error,
397397
{Money.InvalidAmountError,
398-
"Float amounts are not supported in new/2 due to potenial rounding " <>
398+
"Float amounts are not supported in new/2 due to potential rounding " <>
399399
"and precision issues. If absolutely required, use Money.from_float/2"}}
400400

401401
If the use of `float`s is require then the function `Money.from_float/2` is provided with the same arguments as those for `Money.new/2`. `Money.from_float/2` provides an addition check and will return an error if the precision (number of digits) of the provided float is more than 15 (the number of digits guaranteed to round-trip between a 64-bit float and a string).

lib/money.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ defmodule Money do
179179
iex> Money.new 123.445, :USD
180180
{:error,
181181
{Money.InvalidAmountError,
182-
"Float amounts are not supported in new/2 due to potenial " <>
182+
"Float amounts are not supported in new/2 due to potential " <>
183183
"rounding and precision issues. If absolutely required, " <>
184184
"use Money.from_float/2"}}
185185
@@ -232,14 +232,14 @@ defmodule Money do
232232
def new(_currency_code, amount, _options) when is_float(amount) do
233233
{:error,
234234
{Money.InvalidAmountError,
235-
"Float amounts are not supported in new/2 due to potenial rounding " <>
235+
"Float amounts are not supported in new/2 due to potential rounding " <>
236236
"and precision issues. If absolutely required, use Money.from_float/2"}}
237237
end
238238

239239
def new(amount, _currency_code, _options) when is_float(amount) do
240240
{:error,
241241
{Money.InvalidAmountError,
242-
"Float amounts are not supported in new/2 due to potenial rounding " <>
242+
"Float amounts are not supported in new/2 due to potential rounding " <>
243243
"and precision issues. If absolutely required, use Money.from_float/2"}}
244244
end
245245

lib/money/backend.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ defmodule Money.Backend do
9393
iex> #{inspect(__MODULE__)}.new 123.445, :USD
9494
{:error,
9595
{Money.InvalidAmountError,
96-
"Float amounts are not supported in new/2 due to potenial " <>
96+
"Float amounts are not supported in new/2 due to potential " <>
9797
"rounding and precision issues. If absolutely required, " <>
9898
"use Money.from_float/2"}}
9999

0 commit comments

Comments
 (0)