blob: 36e2fc3c49c1afafccb105cd9f2faec7cb8827d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <AK/String.h>
#include <LibJS/Runtime/GlobalObject.h>
namespace JS::Temporal {
struct ISODateTime {
i32 year;
i32 month;
i32 day;
i32 hour;
i32 minute;
i32 second;
i32 millisecond;
i32 microsecond;
i32 nanosecond;
Optional<String> calendar;
};
Optional<ISODateTime> parse_iso_date_time(GlobalObject&, String const& iso_string);
struct TemporalInstant {
i32 year;
i32 month;
i32 day;
i32 hour;
i32 minute;
i32 second;
i32 millisecond;
i32 microsecond;
i32 nanosecond;
Optional<String> time_zone_offset;
};
Optional<TemporalInstant> parse_temporal_instant_string(GlobalObject&, String const& iso_string);
struct TemporalTimeZone {
bool z;
Optional<String> offset;
Optional<String> name;
};
Optional<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject&, String const& iso_string);
}
|