mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +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
|
@ -8,21 +8,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <LibJS/Runtime/Temporal/ISORecords.h>
|
||||
|
||||
namespace JS::Temporal {
|
||||
|
||||
// 4.5.1 Time Records, https://tc39.es/proposal-temporal/#sec-temporal-time-records
|
||||
struct Time {
|
||||
double days { 0 };
|
||||
u8 hour { 0 };
|
||||
u8 minute { 0 };
|
||||
u8 second { 0 };
|
||||
u16 millisecond { 0 };
|
||||
u16 microsecond { 0 };
|
||||
u16 nanosecond { 0 };
|
||||
};
|
||||
|
||||
Time create_time_record(double hour, double minute, double second, double millisecond, double microsecond, double nanosecond, double delta_days = 0);
|
||||
Time midnight_time_record();
|
||||
Time noon_time_record();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue