mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
committed by
Andreas Kling
parent
46998e922a
commit
021a5f4ded
Notes:
github-actions[bot]
2024-11-23 13:47:25 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/021a5f4deda Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2513 Reviewed-by: https://github.com/shannonbooth ✅
@@ -8,17 +8,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Temporal/PlainDate.h>
|
||||
#include <LibJS/Runtime/Temporal/PlainTime.h>
|
||||
#include <LibJS/Runtime/Temporal/ISORecords.h>
|
||||
|
||||
namespace JS::Temporal {
|
||||
|
||||
// 5.5.1 ISO Date-Time Records, https://tc39.es/proposal-temporal/#sec-temporal-iso-date-time-records
|
||||
struct ISODateTime {
|
||||
ISODate iso_date;
|
||||
Time time;
|
||||
};
|
||||
|
||||
ISODateTime combine_iso_date_and_time_record(ISODate, Time);
|
||||
bool iso_date_time_within_limits(ISODateTime);
|
||||
ISODateTime balance_iso_date_time(double year, double month, double day, double hour, double minute, double second, double millisecond, double microsecond, double nanosecond);
|
||||
|
||||
Reference in New Issue
Block a user