/* * Copyright (c) 2021-2023, Linus Groh * Copyright (c) 2024, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace JS::Temporal { class PlainMonthDay final : public Object { JS_OBJECT(PlainMonthDay, Object); GC_DECLARE_ALLOCATOR(PlainMonthDay); public: virtual ~PlainMonthDay() override = default; [[nodiscard]] ISODate iso_date() const { return m_iso_date; } [[nodiscard]] String const& calendar() const { return m_calendar; } private: PlainMonthDay(ISODate, String calendar, Object& prototype); ISODate m_iso_date; // [[ISODate]] String m_calendar; // [[Calendar]] }; ThrowCompletionOr> to_temporal_month_day(VM&, Value item, Value options = js_undefined()); ThrowCompletionOr> create_temporal_month_day(VM&, ISODate, String calendar, GC::Ptr new_target = {}); String temporal_month_day_to_string(PlainMonthDay const&, ShowCalendar); }