diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-19 13:13:57 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-19 20:57:30 +0000 |
commit | bb4b6d8ce3ad648639fe1a2fc44ca7d5c499601d (patch) | |
tree | 181832770e5b96b3fdea26f50d24d42ca05c3959 /Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp | |
parent | 2f1184ccdbb207cb273b75bff9361a4f50674425 (diff) | |
download | serenity-bb4b6d8ce3ad648639fe1a2fc44ca7d5c499601d.zip |
LibJS: Port Intl locale resolution to String
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp index 389469c97b..52781e3aff 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp @@ -110,7 +110,7 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, calendar, "calendar"sv); // 8. Set opt.[[ca]] to calendar. - opt.ca = TRY(calendar.as_string().deprecated_string()); + opt.ca = TRY(calendar.as_string().utf8_string()); } // 9. Let numberingSystem be ? GetOption(options, "numberingSystem", string, empty, undefined). @@ -123,7 +123,7 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, numbering_system, "numberingSystem"sv); // 11. Set opt.[[nu]] to numberingSystem. - opt.nu = TRY(numbering_system.as_string().deprecated_string()); + opt.nu = TRY(numbering_system.as_string().utf8_string()); } // 12. Let hour12 be ? GetOption(options, "hour12", boolean, empty, undefined). @@ -140,7 +140,7 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF // 15. Set opt.[[hc]] to hourCycle. if (!hour_cycle.is_nullish()) - opt.hc = TRY(hour_cycle.as_string().deprecated_string()); + opt.hc = TRY(hour_cycle.as_string().utf8_string()); // 16. Let localeData be %DateTimeFormat%.[[LocaleData]]. // 17. Let r be ResolveLocale(%DateTimeFormat%.[[AvailableLocales]], requestedLocales, opt, %DateTimeFormat%.[[RelevantExtensionKeys]], localeData). |