diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp index 354719d72bb..eb57556a9d1 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp @@ -18,6 +18,11 @@ PlainDatePrototype::PlainDatePrototype(GlobalObject& global_object) void PlainDatePrototype::initialize(GlobalObject& global_object) { Object::initialize(global_object); + + auto& vm = this->vm(); + + // 3.3.2 Temporal.PlainDate.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype-@@tostringtag + define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.PlainDate"), Attribute::Configurable); } } diff --git a/Userland/Libraries/LibJS/Tests/builtins/Temporal/PlainDate/PlainDate.prototype.@@toStringTag.js b/Userland/Libraries/LibJS/Tests/builtins/Temporal/PlainDate/PlainDate.prototype.@@toStringTag.js new file mode 100644 index 00000000000..286d2440cbc --- /dev/null +++ b/Userland/Libraries/LibJS/Tests/builtins/Temporal/PlainDate/PlainDate.prototype.@@toStringTag.js @@ -0,0 +1,3 @@ +test("basic functionality", () => { + expect(Temporal.PlainDate.prototype[Symbol.toStringTag]).toBe("Temporal.PlainDate"); +});