mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
LibJS: Implement a nearly empty Intl.DateTimeFormat object
This adds plumbing for the Intl.DateTimeFormat object, constructor, and prototype. Note that unlike other Intl objects, the Intl.DateTimeFormat object has a LibUnicode structure as a base. This is to prevent wild amounts of code duplication between LibUnicode, Intl.DateTimeFormat, and other not-yet-defined Intl structures, because there's 12 fields shared between them.
This commit is contained in:
parent
6dbdfb6ba1
commit
75b2a09a2f
12 changed files with 329 additions and 4 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <LibJS/Runtime/Array.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Intl/AbstractOperations.h>
|
||||
#include <LibJS/Runtime/Intl/DateTimeFormatConstructor.h>
|
||||
#include <LibJS/Runtime/Intl/DisplayNamesConstructor.h>
|
||||
#include <LibJS/Runtime/Intl/Intl.h>
|
||||
#include <LibJS/Runtime/Intl/ListFormatConstructor.h>
|
||||
|
@ -31,6 +32,7 @@ void Intl::initialize(GlobalObject& global_object)
|
|||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl"), Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_direct_property(vm.names.DateTimeFormat, global_object.intl_date_time_format_constructor(), attr);
|
||||
define_direct_property(vm.names.DisplayNames, global_object.intl_display_names_constructor(), attr);
|
||||
define_direct_property(vm.names.ListFormat, global_object.intl_list_format_constructor(), attr);
|
||||
define_direct_property(vm.names.Locale, global_object.intl_locale_constructor(), attr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue