LibJS: Update Intl AO spec numbers

Otherwise, upcoming AO implementations will conflict with these.
This commit is contained in:
Timothy Flynn 2024-06-25 10:07:35 -04:00 committed by Andreas Kling
parent c379b35798
commit 89aa9a3af0
Notes: sideshowbarker 2024-07-17 02:59:43 +09:00

View File

@ -31,7 +31,7 @@ Optional<LocaleKey> locale_key_from_value(Value value)
VERIFY_NOT_REACHED();
}
// 6.2.2 IsStructurallyValidLanguageTag ( locale ), https://tc39.es/ecma402/#sec-isstructurallyvalidlanguagetag
// 6.2.1 IsStructurallyValidLanguageTag ( locale ), https://tc39.es/ecma402/#sec-isstructurallyvalidlanguagetag
bool is_structurally_valid_language_tag(StringView locale)
{
auto contains_duplicate_variant = [&](auto& variants) {
@ -116,7 +116,7 @@ bool is_structurally_valid_language_tag(StringView locale)
return true;
}
// 6.2.3 CanonicalizeUnicodeLocaleId ( locale ), https://tc39.es/ecma402/#sec-canonicalizeunicodelocaleid
// 6.2.2 CanonicalizeUnicodeLocaleId ( locale ), https://tc39.es/ecma402/#sec-canonicalizeunicodelocaleid
String canonicalize_unicode_locale_id(StringView locale)
{
return Unicode::canonicalize_unicode_locale_id(locale);
@ -138,10 +138,10 @@ bool is_well_formed_currency_code(StringView currency)
return true;
}
// 6.5.1 IsWellFormedUnitIdentifier ( unitIdentifier ), https://tc39.es/ecma402/#sec-iswellformedunitidentifier
// 6.6.1 IsWellFormedUnitIdentifier ( unitIdentifier ), https://tc39.es/ecma402/#sec-iswellformedunitidentifier
bool is_well_formed_unit_identifier(StringView unit_identifier)
{
// 6.5.2 IsSanctionedSingleUnitIdentifier ( unitIdentifier ), https://tc39.es/ecma402/#sec-issanctionedsingleunitidentifier
// 6.6.2 IsSanctionedSingleUnitIdentifier ( unitIdentifier ), https://tc39.es/ecma402/#sec-issanctionedsingleunitidentifier
constexpr auto is_sanctioned_single_unit_identifier = [](StringView unit_identifier) {
// 1. If unitIdentifier is listed in Table 2 below, return true.
// 2. Else, return false.