Skip to content

v2.0.10

Choose a tag to compare

@jsacksick jsacksick released this 23 Sep 08:31
· 1 commit to master since this release

Currency fraction digits now come from ISO 4217 instead of CLDR.

CLDR 48 (shipped in v2.0.8) changed the fraction digits of COP, HUF, IDR and PKR from 2 to 0. Consumers such as Drupal Commerce use these digits to convert amounts to payment gateway minor units, so payments in those currencies were sent at 1/100 of the amount (see https://www.drupal.org/project/commerce/issues/3625166).

Fraction digit changes:

  • COP, HUF, IDR, PKR: back to 2 (as in v2.0.7).
  • AFN, ALL, IRR, KPW, LAK, LBP, MGA, MMK, SOS, SYP, YER: 0 → 2, and IQD: 0 → 3, to match ISO 4217.

The default number of decimals shown by CurrencyFormatter follows these values, so HUF is formatted with 2 decimals again. Pass maximum_fraction_digits to override.

No other data changes.