php-src/ext/intl/formatter
Ayesh Karunaratne c20b429a90 ext/intl: Add NumberFormatter::CURRENCY_ISO, PLURAL, STANDARD and CASH_CURRENCY
ICU 54 and 56 adds the following formatters[^1] for currency formatting:

 - `CURRENCY_ISO`[^2]: ISO currency code, e.g., "USD1.00"
 - `CURRENCY_PLURAL`[^3]: pluralized currency name, e.g., "1.00 US dollar" and "3.00 US dollars"
 - `CASH_CURRENCY`[^4]: currency symbol given CASH usage, e.g., "NT$3" instead of "NT$3.23"
 - `CURRENCY_STANDARD`[^5]: currency symbol, e.g., "$1.00", using non-accounting style for negative values (e.g. minus sign)

Ref: https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/unum_8h.html

This adds support for all four of them to ext/intl, along with tests.

[^1]: https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/unum_8h.html
[^2]: https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/unum_8h.html#a4eb4d3ff13bd506e7078b2be4052266daae232c48e579c727525855cd21571033
[^3]: https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/unum_8h.html#a4eb4d3ff13bd506e7078b2be4052266da3916bb92d0784396ea2331d4f04c03f5
[^4]: https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/unum_8h.html#a4eb4d3ff13bd506e7078b2be4052266da8da9eba1a27d5734599709c137c3b82f
[^5]: https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/unum_8h.html#a4eb4d3ff13bd506e7078b2be4052266dac57cfff1b245d11774e8b109b98eedc2
2025-04-09 05:39:20 +07:00
..
formatter.stub.php ext/intl: Add NumberFormatter::CURRENCY_ISO, PLURAL, STANDARD and CASH_CURRENCY 2025-04-09 05:39:20 +07:00
formatter_arginfo.h ext/intl: Add NumberFormatter::CURRENCY_ISO, PLURAL, STANDARD and CASH_CURRENCY 2025-04-09 05:39:20 +07:00
formatter_attr.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
formatter_class.c Replace @deprecated by #[\Deprecated] for internal functions / class constants (#14750) 2024-07-10 16:47:31 +02:00
formatter_class.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
formatter_data.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
formatter_data.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
formatter_format.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
formatter_format.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
formatter_functions_arginfo.h Do not include the same stub multiple times 2020-04-03 14:23:54 +02:00
formatter_main.c Trim trailing whitespace (#14721) 2024-06-29 18:41:45 +02:00
formatter_parse.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00