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

LibJS: Make regulate_iso_date() and iso_date_from_fields() use ISODate

No need for TemporalDate, we don't use the calendar field here anyway.
This commit is contained in:
Linus Groh 2021-08-04 22:28:21 +01:00 committed by Andreas Kling
parent dd58d0f650
commit e036f4a786
5 changed files with 8 additions and 8 deletions

View file

@ -7,7 +7,6 @@
#pragma once
#include <LibJS/Runtime/Temporal/AbstractOperations.h>
#include <LibJS/Runtime/Value.h>
namespace JS::Temporal {
@ -43,7 +42,7 @@ struct ISODate {
PlainDate* create_temporal_date(GlobalObject&, i32 iso_year, u8 iso_month, u8 iso_day, Object& calendar, FunctionObject* new_target = nullptr);
PlainDate* to_temporal_date(GlobalObject&, Value item, Object* options = nullptr);
Optional<TemporalDate> regulate_iso_date(GlobalObject&, double year, double month, double day, String const& overflow);
Optional<ISODate> regulate_iso_date(GlobalObject&, double year, double month, double day, String const& overflow);
bool is_valid_iso_date(i32 year, u8 month, u8 day);
ISODate balance_iso_date(i32 year, i32 month, i32 day);
i8 compare_iso_date(i32 year1, u8 month1, u8 day1, i32 year2, u8 month2, u8 day2);