LibJS: Move Intl.DateTimeFormat creation to CreateDateTimeFormat AO

This is an editorial change in the ECMA-402 spec. See:
b6ed64b
6e3b70d

This moves Intl.DateTimeFormat creation to InitializeDateTimeFormat and
renames that AO to CreateDateTimeFormat.
This commit is contained in:
Timothy Flynn 2023-07-21 21:33:55 -04:00 committed by Linus Groh
commit 3a4cdf77ba
Notes: sideshowbarker 2024-07-16 21:42:29 +09:00
3 changed files with 107 additions and 113 deletions

View file

@ -6,6 +6,7 @@
#pragma once
#include <LibJS/Runtime/Intl/DateTimeFormat.h>
#include <LibJS/Runtime/NativeFunction.h>
namespace JS::Intl {
@ -28,6 +29,6 @@ private:
JS_DECLARE_NATIVE_FUNCTION(supported_locales_of);
};
ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM&, DateTimeFormat&, Value locales_value, Value options_value);
ThrowCompletionOr<NonnullGCPtr<DateTimeFormat>> create_date_time_format(VM&, FunctionObject& new_target, Value locales_value, Value options_value, OptionRequired, OptionDefaults);
}