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

LibJS: Convert PlainYearMonth AOs to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-09-16 01:57:24 +03:00 committed by Linus Groh
parent cc00a726a8
commit c57a78423d
6 changed files with 48 additions and 80 deletions

View file

@ -39,13 +39,13 @@ struct ISOYearMonth {
u8 reference_iso_day;
};
PlainYearMonth* to_temporal_year_month(GlobalObject& global_object, Value item, Object* options = nullptr);
Optional<ISOYearMonth> regulate_iso_year_month(GlobalObject&, double year, double month, StringView overflow);
ThrowCompletionOr<PlainYearMonth*> to_temporal_year_month(GlobalObject& global_object, Value item, Object* options = nullptr);
ThrowCompletionOr<ISOYearMonth> regulate_iso_year_month(GlobalObject&, double year, double month, StringView 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 const* new_target = nullptr);
Optional<String> temporal_year_month_to_string(GlobalObject&, PlainYearMonth&, StringView show_calendar);
ThrowCompletionOr<PlainYearMonth*> create_temporal_year_month(GlobalObject&, i32 iso_year, u8 iso_month, Object& calendar, u8 reference_iso_day, FunctionObject const* new_target = nullptr);
ThrowCompletionOr<String> temporal_year_month_to_string(GlobalObject&, PlainYearMonth&, StringView show_calendar);
}