mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibJS: Move ISO-related structures to their own file
Currently, AbstractOperations.h needs to include Time.h for the Time structure. Soon, Time.h will need to include AbstractOperations.h for structures defined there. To avoid a circular include, let's put the ISO types into their own file, so that AO.h does not need to include any JS type header.
This commit is contained in:
parent
46998e922a
commit
021a5f4ded
Notes:
github-actions[bot]
2024-11-23 13:47:25 +00:00
Author: https://github.com/trflynn89
Commit: 021a5f4ded
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2513
Reviewed-by: https://github.com/shannonbooth ✅
8 changed files with 79 additions and 58 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
#include <LibJS/Runtime/Temporal/AbstractOperations.h>
|
||||
#include <LibJS/Runtime/Temporal/ISORecords.h>
|
||||
#include <LibJS/Runtime/Temporal/PlainDate.h>
|
||||
|
||||
namespace JS::Temporal {
|
||||
|
@ -32,12 +33,6 @@ private:
|
|||
String m_calendar; // [[Calendar]]
|
||||
};
|
||||
|
||||
// 9.5.1 ISO Year-Month Records, https://tc39.es/proposal-temporal/#sec-temporal-iso-year-month-records
|
||||
struct ISOYearMonth {
|
||||
i32 year { 0 };
|
||||
u8 month { 0 };
|
||||
};
|
||||
|
||||
ThrowCompletionOr<GC::Ref<PlainYearMonth>> to_temporal_year_month(VM&, Value item, Value options = js_undefined());
|
||||
bool iso_year_month_within_limits(ISODate);
|
||||
ISOYearMonth balance_iso_year_month(double year, double month);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue