1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 08:05:07 +00:00
serenity/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.h
Linus Groh 0a8edd5ce7 LibJS: Start implementing Temporal.PlainYearMonth
This commit adds the PlainYearMonth object itself, its constructor and
prototype (currently empty), and the CreateTemporalYearMonth and
ISOYearMonthWithinLimits abstract operations.
2021-08-08 17:45:06 +01:00

28 lines
678 B
C++

/*
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Runtime/NativeFunction.h>
namespace JS::Temporal {
class PlainYearMonthConstructor final : public NativeFunction {
JS_OBJECT(PlainYearMonthConstructor, NativeFunction);
public:
explicit PlainYearMonthConstructor(GlobalObject&);
virtual void initialize(GlobalObject&) override;
virtual ~PlainYearMonthConstructor() override = default;
virtual Value call() override;
virtual Value construct(FunctionObject& new_target) override;
private:
virtual bool has_constructor() const override { return true; }
};
}