1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 16:58:11 +00:00
serenity/Userland/Libraries/LibJS/Runtime/Intl
Timothy Flynn a701ed52fc LibJS+LibUnicode: Fully implement currency number formatting
Currencies are a bit strange; the layout of currency data in the CLDR is
not particularly compatible with what ECMA-402 expects. For example, the
currency format in the "en" and "ar" locales for the Latin script are:

    en: "¤#,##0.00"
    ar: "¤\u00A0#,##0.00"

Note how the "ar" locale has a non-breaking space after the currency
symbol (¤), but "en" does not. This does not mean that this space will
appear in the "ar"-formatted string, nor does it mean that a space won't
appear in the "en"-formatted string. This is a runtime decision based on
the currency display chosen by the user ("$" vs. "USD" vs. "US dollar")
and other rules in the Unicode TR-35 spec.

ECMA-402 shies away from the nuances here with "implementation-defined"
steps. LibUnicode will store the data parsed from the CLDR however it is
presented; making decisions about spacing, etc. will occur at runtime
based on user input.
2021-11-13 11:52:45 +00:00
..
AbstractOperations.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
AbstractOperations.h LibJS: Change Intl's PatternPartition record to hold a String value 2021-11-12 09:17:08 +00:00
DisplayNames.cpp LibJS: Use implicit ThrowCompletionOr<T> constructor where possible 2021-10-21 09:02:23 +01:00
DisplayNames.h LibJS: Convert DisplayNames AOs to ThrowCompletionOr 2021-09-18 22:59:15 +03:00
DisplayNamesConstructor.cpp LibJS: Convert Intl.DisplayNames functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
DisplayNamesConstructor.h LibJS: Convert Intl.DisplayNames functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
DisplayNamesPrototype.cpp LibJS+LibUnicode: Generate all styles of currency localizations 2021-11-13 11:52:45 +00:00
DisplayNamesPrototype.h LibJS: Convert Intl.DisplayNames functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
Intl.cpp LibJS: Convert Intl.getCanonicalLocales() function to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
Intl.h LibJS: Convert Intl.getCanonicalLocales() function to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
ListFormat.cpp LibJS: Change Intl's PatternPartition record to hold a String value 2021-11-12 09:17:08 +00:00
ListFormat.h LibJS: Convert ListFormat AOs to ThrowCompletionOr 2021-09-18 22:59:15 +03:00
ListFormatConstructor.cpp LibJS: Convert Intl.ListFormat functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
ListFormatConstructor.h LibJS: Convert Intl.ListFormat functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
ListFormatPrototype.cpp LibJS: Convert Intl.ListFormat functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
ListFormatPrototype.h LibJS: Convert Intl.ListFormat functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
Locale.cpp LibJS: Move locale_relevant_extension_keys to Intl.Locale 2021-09-12 12:57:17 +01:00
Locale.h LibJS: Move locale_relevant_extension_keys to Intl.Locale 2021-09-12 12:57:17 +01:00
LocaleConstructor.cpp LibJS: Rename PropertyName to PropertyKey 2021-10-24 17:18:07 +02:00
LocaleConstructor.h LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr 2021-10-21 09:02:23 +01:00
LocalePrototype.cpp LibJS: Convert Intl.Locale functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
LocalePrototype.h LibJS: Convert Intl.Locale functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
NumberFormat.cpp LibJS+LibUnicode: Fully implement currency number formatting 2021-11-13 11:52:45 +00:00
NumberFormat.h LibJS+LibUnicode: Fully implement currency number formatting 2021-11-13 11:52:45 +00:00
NumberFormatConstructor.cpp LibJS: Convert Intl.NumberFormat functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
NumberFormatConstructor.h LibJS: Convert Intl.NumberFormat functions to ThrowCompletionOr 2021-10-22 23:20:18 +01:00
NumberFormatFunction.cpp LibJS: Begin implementing Intl.NumberFormat.prototype.format 2021-11-12 09:17:08 +00:00
NumberFormatFunction.h LibJS: Begin implementing Intl.NumberFormat.prototype.format 2021-11-12 09:17:08 +00:00
NumberFormatPrototype.cpp LibJS: Begin implementing Intl.NumberFormat.prototype.format 2021-11-12 09:17:08 +00:00
NumberFormatPrototype.h LibJS: Begin implementing Intl.NumberFormat.prototype.format 2021-11-12 09:17:08 +00:00