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

LibJS: Implement the ToTemporalDate Abstract Operation

This is required by most Temporal.PlainDate.prototype methods.
This commit is contained in:
Idan Horowitz 2021-07-21 22:20:57 +03:00 committed by Linus Groh
parent 1e471e2e2f
commit cf78efaef5
7 changed files with 245 additions and 11 deletions

View file

@ -33,8 +33,11 @@ Calendar* create_temporal_calendar(GlobalObject&, String const& identifier, Func
bool is_builtin_calendar(String const& identifier);
Calendar* get_builtin_calendar(GlobalObject&, String const& identifier);
Calendar* get_iso8601_calendar(GlobalObject&);
Vector<String> calendar_fields(GlobalObject&, Object& calendar, Vector<StringView> const& field_names);
Object* to_temporal_calendar(GlobalObject&, Value);
Object* to_temporal_calendar_with_iso_default(GlobalObject&, Value);
Object* get_temporal_calendar_with_iso_default(GlobalObject&, Object&);
PlainDate* date_from_fields(GlobalObject&, Object& calendar, Object& fields, Object& options);
bool is_iso_leap_year(i32 year);
i32 iso_days_in_month(i32 year, i32 month);
String build_iso_month_code(i32 month);