money icon indicating copy to clipboard operation
money copied to clipboard

fix(currency): Albanian Lek subunit should be 1

Open allencch opened this issue 1 year ago • 6 comments

When using JavaScript Intl.NumberFormat, it shows different subunit for Albanian Lek currency. For example,

let numFormat = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'ALL' });
let { minimumFractionDigits } = numFormat.resolvedOptions();
console.log(minimumFractionDigits);
// Result shows 0 instead of 2

Hence, I think it is necessary to change the Albanian Lek subunits to 1. I believe this will be a breaking change as well.

allencch avatar Apr 11 '24 06:04 allencch

can you find a web reference (wikipedia, ministry of finance, etc) that confirms this is true and include in changelog please.

semmons99 avatar Apr 15 '24 12:04 semmons99

The currency in Albania is the Lek. The smallest unit is 1 Lek and there are no cents.

link

This is so far the most direct reference I can find.

I can't find any related change log or ICU source code on how the minimumFractionDigits is configured.

allencch avatar Apr 15 '24 13:04 allencch

Goo d enough for me

Cheers. 🤘SE

On Mon, Apr 15, 2024 at 9:28 AM, Allen < @.*** > wrote:

The currency in Albania is the Lek. The smallest unit is 1 Lek and there are no cents.

link ( https://ecotouralbania.com/en/about-albania/before-your-departure/ )

This is so far the most direct reference I can find.

I can't find any related change log or ICU source code on how the minimumFractionDigits is configured.

— Reply to this email directly, view it on GitHub ( https://github.com/RubyMoney/money/pull/1092#issuecomment-2056856543 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAAGYHZLUF6GDU35K3CZWU3Y5PIWJAVCNFSM6AAAAABGBXAPN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJWHA2TMNJUGM ). You are receiving this because you commented. Message ID: <RubyMoney/money/pull/1092/c2056856543 @ github. com>

semmons99 avatar Apr 15 '24 13:04 semmons99

Hi, there is an opposite request at #1098. The request here is to "remove subunits to match the fact that subunits are no longer produced", there is to "reintroduce subunits to match ISO 4217"

In the example file linked there, https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml, still has 2 decimals for ALL

tagliala avatar Jun 04 '24 18:06 tagliala

Maintainers should make a decision if the gem is meant to follow conventions/common use or ISO standards and be clear what is being returned.

If there's interest in doing both, methods should be clearly labeled to indicate if iso values or common values are returned.

matid avatar Jul 03 '24 02:07 matid