1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:57:35 +00:00

LibJS: Implement Temporal.Calendar.prototype.yearMonthFromFields()

This commit is contained in:
Linus Groh 2021-08-16 00:35:05 +01:00
parent c1c12497b5
commit ed9d37bd40
10 changed files with 223 additions and 14 deletions

View file

@ -36,10 +36,14 @@ private:
struct ISOYearMonth {
i32 year;
u8 month;
u8 reference_iso_day;
};
ISOYearMonth balance_iso_year_month(i32 year, i32 month);
Optional<ISOYearMonth> regulate_iso_year_month(GlobalObject&, double year, double month, String const& overflow);
bool is_valid_iso_month(u8 month);
bool iso_year_month_within_limits(i32 year, u8 month);
ISOYearMonth balance_iso_year_month(double year, double month);
ISOYearMonth constrain_iso_year_month(double year, double month);
PlainYearMonth* create_temporal_year_month(GlobalObject&, i32 iso_year, u8 iso_month, Object& calendar, u8 reference_iso_day, FunctionObject* new_target = nullptr);
}