summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2023-01-26 12:19:23 +0000
committerLinus Groh <mail@linusgroh.de>2023-01-26 20:20:54 +0000
commit0435156a862dee0c3f18950e82f5662cc8233cb7 (patch)
tree805d16ce634ee2ef7c1b116b71fe21c10fc5b89d /Userland/Libraries
parenta387b225994084a1c3f00f547b4d069bde177b18 (diff)
downloadserenity-0435156a862dee0c3f18950e82f5662cc8233cb7.zip
LibJS: Port to_calendar_name_option() to String
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
index abd864364a..11d585d775 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
@@ -244,13 +244,13 @@ ThrowCompletionOr<String> to_temporal_offset(VM& vm, Object const* options, Stri
}
// 13.9 ToCalendarNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-tocalendarnameoption
-ThrowCompletionOr<DeprecatedString> to_calendar_name_option(VM& vm, Object const& normalized_options)
+ThrowCompletionOr<String> to_calendar_name_option(VM& vm, Object const& normalized_options)
{
// 1. Return ? GetOption(normalizedOptions, "calendarName", "string", ยซ "auto", "always", "never", "critical" ยป, "auto").
auto option = TRY(get_option(vm, normalized_options, vm.names.calendarName, OptionType::String, { "auto"sv, "always"sv, "never"sv, "critical"sv }, "auto"sv));
VERIFY(option.is_string());
- return TRY(option.as_string().deprecated_string());
+ return option.as_string().utf8_string();
}
// 13.10 ToTimeZoneNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-totimezonenameoption
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h
index 8ea2b4fc41..96f5c8db6d 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h
@@ -140,7 +140,7 @@ ThrowCompletionOr<String> to_temporal_disambiguation(VM&, Object const* options)
ThrowCompletionOr<String> to_temporal_rounding_mode(VM&, Object const& normalized_options, StringView fallback);
StringView negate_temporal_rounding_mode(StringView rounding_mode);
ThrowCompletionOr<String> to_temporal_offset(VM&, Object const* options, StringView fallback);
-ThrowCompletionOr<DeprecatedString> to_calendar_name_option(VM&, Object const& normalized_options);
+ThrowCompletionOr<String> to_calendar_name_option(VM&, Object const& normalized_options);
ThrowCompletionOr<DeprecatedString> to_time_zone_name_option(VM&, Object const& normalized_options);
ThrowCompletionOr<DeprecatedString> to_show_offset_option(VM&, Object const& normalized_options);
ThrowCompletionOr<u64> to_temporal_rounding_increment(VM&, Object const& normalized_options, Optional<double> dividend, bool inclusive);