-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.d.ts
More file actions
127 lines (110 loc) · 3.95 KB
/
index.d.ts
File metadata and controls
127 lines (110 loc) · 3.95 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
export class Instant {
constructor(nanos_since_epoch : BigInt);
readonly seconds: number;
readonly milliseconds: number;
readonly microseconds: BigInt;
readonly nanoseconds: BigInt;
withZone(timeZone : string) : ZonedDateTime;
toString() : string;
toJSON() : string;
static fromString(isostring: string) : Instant;
static fromSeconds(seconds: number) : Instant;
static fromMilliseconds(milliseconds : number) : Instant;
static fromMicroseconds(micros: BigInt) : Instant;
static fromNanoseconds(nanos: BigInt) : Instant;
}
export class ZonedDateTime {
constructor(instant : Instant, timeZone: string);
readonly instant: Instant;
readonly offsetSeconds : number;
readonly offsetString: string;
readonly ianaZone: string | undefined;
readonly timeZone: string;
toString(): string;
toJSON(): string;
static fromString(isostring: string) : ZonedDateTime;
static fromSeconds(seconds : number, zone : string) : ZonedDateTime;
static fromMilliseconds(milliseconds : number, zone : string) : ZonedDateTime;
static fromMicroseconds(micros : BigInt, zone : string) : ZonedDateTime;
static fromNanoseconds(nanos : BigInt, zone : string) : ZonedDateTime;
}
export interface CivilDateValues {
years?: number;
months?: number;
days?: number;
}
export interface CivilTimeValues {
hours?: number;
minutes?: number;
seconds?: number;
milliseconds?: number;
microseconds?: number;
nanoseconds?: number;
}
export interface CivilDateTimeValues extends CivilTimeValues, CivilDateValues {
}
export class CivilDateTime {
constructor(years : number, months : number, days : number, hours : number, minutes : number, seconds : number = 0, nanoseconds : number = 0);
readonly year : number;
readonly month : number;
readonly day : number;
readonly hour : number;
readonly minute : number;
readonly second : number;
readonly millisecond : number;
readonly microsecond : number;
readonly nanosecond : number;
readonly dayOfWeek : number;
readonly dayOfYear : number;
readonly weekOfYear : number;
plus(data: CivilDateTimeValues) : CivilDateTime;
with(values: CivilDateTimeValues) : CivilDateTime;
withZone(zone : string) : ZonedDateTime;
toString() : string;
toJSON() : string;
toDateTimeString() : string;
toWeekDateTimeString() : string;
toOrdinalDateTimeString() : string;
static fromDateTimeString(isostring : string): string;
static fromWeekDateTimeString(isostring : string): string;
static fromOrdinalDateTimeString(isostring : string): string;
static fromString(isostring: string): CivilDateTime;
static fromZonedDateTime(instant: ZonedDateTime): CivilDateTime;
}
export class CivilDate {
constructor(years : number, months: number, days : number);
readonly year : number;
readonly month : number;
readonly day : number;
readonly dayOfWeek : number;
readonly dayOfYear : number;
readonly weekOfYear : number;
plus(data : CivilDateValues) : CivilDate;
with(values : CivilDateValues) : CivilDate;
withTime(time : CivilTime) : CivilDateTime;
toString() : string;
toJSON() : string;
toDateString() : string;
toWeekDateString() : string;
toOrdinalDateString() : string;
static fromString(isostring : string) : CivilDate;
static fromZonedDateTime(instant : ZonedDateTime) : CivilDate;
static fromDateTime(datetime : CivilDateTime) : CivilDate;
}
export class CivilTime {
constructor(hours : number, minutes : number, seconds? : number, nanoseconds?: number);
readonly hour : number;
readonly minute : number;
readonly second : number;
readonly millisecond : number;
readonly microsecond : number;
readonly nanosecond : number;
plus(data : CivilTimeValues) : CivilTime;
with(values : CivilTimeValues) : CivilTime;
withDate(date : CivilDate) : CivilDateTime;
toString() : string;
toJSON() : string;
static fromString(isostring : string) : CivilTime;
static fromZonedDateTime(instant : ZonedDateTime) : CivilTime;
static fromDateTime(datetime: CivilDateTime): CivilTime;
}