summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-01-12 10:22:37 -0500
committerLinus Groh <mail@linusgroh.de>2023-01-14 19:12:48 +0000
commit95cef87a9c10fd97c01d5a590de778ac5f19c4f3 (patch)
treeb68cab1e979ab92e309ebef010cccb6763ceb39b /Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
parent2cca5d66767d2a5a9f16e67a5f70393581873226 (diff)
downloadserenity-95cef87a9c10fd97c01d5a590de778ac5f19c4f3.zip
LibJS: Update syntax for invoking the GetOption AO from Intl objects
This is an editorial change in the ECMA-402 spec. See: https://github.com/tc39/ecma402/commit/0ac2e10
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
index 51d8d87f82..05a66798b7 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DurationFormat.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2022, Idan Horowitz <idan.horowitz@serenityos.org>
- * Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
+ * Copyright (c) 2022-2023, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -270,7 +270,7 @@ bool is_valid_duration_record(Temporal::DurationRecord const& record)
// 1.1.6 GetDurationUnitOptions ( unit, options, baseStyle, stylesList, digitalBase, prevStyle ), https://tc39.es/proposal-intl-duration-format/#sec-getdurationunitoptions
ThrowCompletionOr<DurationUnitOptions> get_duration_unit_options(VM& vm, DeprecatedString const& unit, Object const& options, StringView base_style, Span<StringView const> styles_list, StringView digital_base, StringView previous_style)
{
- // 1. Let style be ? GetOption(options, unit, "string", stylesList, undefined).
+ // 1. Let style be ? GetOption(options, unit, string, stylesList, undefined).
auto style_value = TRY(get_option(vm, options, unit, OptionType::String, styles_list, Empty {}));
// 2. Let displayDefault be "always".
@@ -314,7 +314,7 @@ ThrowCompletionOr<DurationUnitOptions> get_duration_unit_options(VM& vm, Depreca
// 4. Let displayField be the string-concatenation of unit and "Display".
auto display_field = DeprecatedString::formatted("{}Display", unit);
- // 5. Let display be ? GetOption(options, displayField, "string", « "auto", "always" », displayDefault).
+ // 5. Let display be ? GetOption(options, displayField, string, « "auto", "always" », displayDefault).
auto display = TRY(get_option(vm, options, display_field, OptionType::String, { "auto"sv, "always"sv }, display_default));
// 6. If prevStyle is "numeric" or "2-digit", then