1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

LibJS: Implement a nearly empty Intl.RelativeTimeFormat object

This adds plumbing for the Intl.RelativeTimeFormat object, constructor,
and prototype.
This commit is contained in:
Timothy Flynn 2022-01-25 10:41:57 -05:00 committed by Linus Groh
parent 0865f71d37
commit 79fdec85de
12 changed files with 271 additions and 1 deletions

View file

@ -13,6 +13,7 @@
#include <LibJS/Runtime/Intl/ListFormatConstructor.h>
#include <LibJS/Runtime/Intl/LocaleConstructor.h>
#include <LibJS/Runtime/Intl/NumberFormatConstructor.h>
#include <LibJS/Runtime/Intl/RelativeTimeFormatConstructor.h>
namespace JS::Intl {
@ -37,6 +38,7 @@ void Intl::initialize(GlobalObject& global_object)
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);
define_direct_property(vm.names.NumberFormat, global_object.intl_number_format_constructor(), attr);
define_direct_property(vm.names.RelativeTimeFormat, global_object.intl_relative_time_format_constructor(), attr);
define_native_function(vm.names.getCanonicalLocales, get_canonical_locales, 1, attr);
}