Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Note on use of CLDR data for rounding currency values #921

Closed
wants to merge 1 commit into from

Conversation

ben-allen
Copy link
Contributor

For some currencies, CLDR gives two values for determining the number of minor digits displayed when formatting those currencies. This note explains that the value of the "cashDigits" attribute, and likewise the value of the "cashRounding" attribute, should not be used when formatting values denominated in those currencies.

fix #835 (or at least, close it).

address #134

implementations using CLDR should not use CLDR's "cashDigits" and
"cashRounding" attributes when formatting currency values.
@anba
Copy link
Contributor

anba commented Aug 27, 2024

The current spec text doesn't even allow to use CLDR in the first place, because it explicitly references the "ISO 4217 currency and funds code list". I think we first need to a normative change to either allow in CLDR in addition to ISO 4217 or alternatively use CLDR instead of ISO 4217.

IIRC it depends on the specific application if ISO 4217 or CLDR is a better choice. And for some applications neither is actually the best choice.

@ben-allen
Copy link
Contributor Author

Replaces #839

@sffc
Copy link
Contributor

sffc commented Aug 27, 2024

Does CLDR endeavor to match ISO-4217? Or are the CLDR currency digit settings just different from the ISO ones? Based on #134, it seems like it is expected for CLDR to differ.

It would be nice to mention this in UTS 35, and then this PR should simply make it conformant for implementations to use something other than ISO-4217 digit counts. It should be an ILD behavior.

ben-allen added a commit to ben-allen/ecma402 that referenced this pull request Sep 10, 2024
This PR allows for locale data other than ISO 4217 for determining
the number of fractional digits to be used when formatting currency
values.

In some applications ISO 4217 is most appropriate, in some CLDR data,
and in some neither is best. See tc39#921 (comment)

Resolves tc39#134

This PR makes the `CurrencyDigits` AO implementation-defined.
ben-allen added a commit to ben-allen/ecma402 that referenced this pull request Sep 12, 2024
This PR allows for locale data other than ISO 4217 for determining
the number of fractional digits to be used when formatting currency
values.

In some applications ISO 4217 is most appropriate, in some CLDR data,
and in some neither is best. See tc39#921 (comment)

Resolves tc39#134

This PR makes the `CurrencyDigits` AO implementation-defined.
@ben-allen
Copy link
Contributor Author

Closed because replaced by #922, which makes the currency list used purely implementation-defined.

@ben-allen ben-allen closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support cash rounding
3 participants