mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibJS: Default to "short" for DurationFormat's style option
This is a normative change in the Intl.DurationFormat proposal. See:
b289494
This commit is contained in:
parent
765d016670
commit
d57b92da09
4 changed files with 33 additions and 33 deletions
|
@ -89,8 +89,8 @@ ThrowCompletionOr<Object*> DurationFormatConstructor::construct(FunctionObject&
|
|||
if (result.nu.has_value())
|
||||
duration_format->set_numbering_system(result.nu.release_value());
|
||||
|
||||
// 13. Let style be ? GetOption(options, "style", "string", « "long", "short", "narrow", "digital" », "long").
|
||||
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "long"sv, "short"sv, "narrow"sv, "digital"sv }, "long"sv));
|
||||
// 13. Let style be ? GetOption(options, "style", "string", « "long", "short", "narrow", "digital" », "short").
|
||||
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "long"sv, "short"sv, "narrow"sv, "digital"sv }, "short"sv));
|
||||
|
||||
// 14. Set durationFormat.[[Style]] to style.
|
||||
duration_format->set_style(style.as_string().string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue