1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:17:45 +00:00

LibJS: Rename ToShowTimeZoneNameOption to ToTimeZoneNameOption

This is an editorial change in Temporal spec.

See: ab5b1ba910
This commit is contained in:
Smrtnyk 2022-11-05 12:39:01 +01:00 committed by Linus Groh
parent 6c6c94f05a
commit 2ba2e6ca0a
3 changed files with 5 additions and 5 deletions

View file

@ -253,8 +253,8 @@ ThrowCompletionOr<String> to_calendar_name_option(VM& vm, Object const& normaliz
return option.as_string().string(); return option.as_string().string();
} }
// 13.10 ToShowTimeZoneNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-toshowtimezonenameoption // 13.10 ToTimeZoneNameOption ( normalizedOptions ), https://tc39.es/proposal-temporal/#sec-temporal-totimezonenameoption
ThrowCompletionOr<String> to_show_time_zone_name_option(VM& vm, Object const& normalized_options) ThrowCompletionOr<String> to_time_zone_name_option(VM& vm, Object const& normalized_options)
{ {
// 1. Return ? GetOption(normalizedOptions, "timeZoneName", "string", « "auto", "never", "critical" », "auto"). // 1. Return ? GetOption(normalizedOptions, "timeZoneName", "string", « "auto", "never", "critical" », "auto").
auto option = TRY(get_option(vm, normalized_options, vm.names.timeZoneName, OptionType::String, { "auto"sv, "never"sv, "critical"sv }, "auto"sv)); auto option = TRY(get_option(vm, normalized_options, vm.names.timeZoneName, OptionType::String, { "auto"sv, "never"sv, "critical"sv }, "auto"sv));

View file

@ -141,7 +141,7 @@ ThrowCompletionOr<String> to_temporal_rounding_mode(VM&, Object const& normalize
StringView negate_temporal_rounding_mode(String const& rounding_mode); StringView negate_temporal_rounding_mode(String const& rounding_mode);
ThrowCompletionOr<String> to_temporal_offset(VM&, Object const* options, String const& fallback); ThrowCompletionOr<String> to_temporal_offset(VM&, Object const* options, String const& fallback);
ThrowCompletionOr<String> to_calendar_name_option(VM&, Object const& normalized_options); ThrowCompletionOr<String> to_calendar_name_option(VM&, Object const& normalized_options);
ThrowCompletionOr<String> to_show_time_zone_name_option(VM&, Object const& normalized_options); ThrowCompletionOr<String> to_time_zone_name_option(VM&, Object const& normalized_options);
ThrowCompletionOr<String> to_show_offset_option(VM&, Object const& normalized_options); ThrowCompletionOr<String> 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); ThrowCompletionOr<u64> to_temporal_rounding_increment(VM&, Object const& normalized_options, Optional<double> dividend, bool inclusive);
ThrowCompletionOr<u64> to_temporal_date_time_rounding_increment(VM&, Object const& normalized_options, StringView smallest_unit); ThrowCompletionOr<u64> to_temporal_date_time_rounding_increment(VM&, Object const& normalized_options, StringView smallest_unit);

View file

@ -1086,8 +1086,8 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::to_string)
// 6. Let showCalendar be ? ToCalendarNameOption(options). // 6. Let showCalendar be ? ToCalendarNameOption(options).
auto show_calendar = TRY(to_calendar_name_option(vm, *options)); auto show_calendar = TRY(to_calendar_name_option(vm, *options));
// 7. Let showTimeZone be ? ToShowTimeZoneNameOption(options). // 7. Let showTimeZone be ? ToTimeZoneNameOption(options).
auto show_time_zone = TRY(to_show_time_zone_name_option(vm, *options)); auto show_time_zone = TRY(to_time_zone_name_option(vm, *options));
// 8. Let showOffset be ? ToShowOffsetOption(options). // 8. Let showOffset be ? ToShowOffsetOption(options).
auto show_offset = TRY(to_show_offset_option(vm, *options)); auto show_offset = TRY(to_show_offset_option(vm, *options));