-
Notifications
You must be signed in to change notification settings - Fork 0
/
ZonedDate.d.ts
134 lines (118 loc) · 5.65 KB
/
ZonedDate.d.ts
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
128
129
130
131
132
133
134
type ValueSetter<T = number> = T | undefined | ((value: T) => T | undefined)
type Disambiguation = 'compatible' | 'earlier' | 'later' | 'reject'
type Options = {
timezone?: string
disambiguation?: Disambiguation
}
export default class ZonedDate {
static UTC : typeof Date.UTC
static now : typeof Date.now
static parse: typeof Date.parse
static defaultTimezone: string
static defaultDisambiguation: Disambiguation
constructor(options?: Options)
constructor(zonedDate: ZonedDate, options?: Options)
constructor(date: Date, options?: Options)
constructor(time: number, options?: Options)
constructor(dateStr: string, options?: Options)
constructor(fullYear: number, month: number, options?: Options)
constructor(fullYear: number, month: number, date: number, options?: Options)
constructor(fullYear: number, month: number, date: number, hours: number, options?: Options)
constructor(fullYear: number, month: number, date: number, hours: number, minutes: number, options?: Options)
constructor(fullYear: number, month: number, date: number, hours: number, minutes: number, seconds: number, options?: Options)
constructor(fullYear: number, month: number, date: number, hours: number, minutes: number, seconds: number, miliseconds: number, options?: Options)
get timezone(): string
set timezone(timezone: ValueSetter<string>)
getTimezone(): string
setTimezone(timezone?: ValueSetter<string>): this
withTimezone(timezone?: ValueSetter<string>): ZonedDate
get disambiguation(): Disambiguation
set disambiguation(disambiguation: ValueSetter<Disambiguation>)
getDisambiguation(): Disambiguation
setDisambiguation(disambiguation?: ValueSetter<Disambiguation>): this
withDisambiguation(disambiguation?: ValueSetter<Disambiguation>): ZonedDate
set fullYear(year: ValueSetter)
get fullYear(): number
setFullYear(year?: ValueSetter): this
withFullYear(year?: ValueSetter): ZonedDate
set utcFullYear(year: ValueSetter)
get utcFullYear(): number
setUTCFullYear(year?: ValueSetter): this
withUTCFullYear(year?: ValueSetter): ZonedDate
set month(month: ValueSetter)
get month(): number
getMonth(): number
setMonth(month?: ValueSetter): this
withMonth(month?: ValueSetter): ZonedDate
set utcMonth(month: ValueSetter)
get utcMonth(): number
setUTCMonth(month?: ValueSetter): this
withUTCMonth(month?: ValueSetter): ZonedDate
set date(date: ValueSetter)
get date(): number
getDate(): number
setDate(date?: ValueSetter, hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): this
withDate(date?: ValueSetter, hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set utcDate(date: ValueSetter)
get utcDate(): number
setUTCDate(date?: ValueSetter, hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): this
withUTCDate(date?: ValueSetter, hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set hours(hours: ValueSetter)
get hours(): number
getHours(): number
setHours(hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): this
withHours(hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set utcHours(hours: ValueSetter)
get utcHours(): number
setUTCHours(hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): this
withUTCHours(hours?: ValueSetter, minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set minutes(minutes: ValueSetter)
get minutes(): number
getMinutes(): number
setMinutes(minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): this
withMinutes(minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set utcMinutes(minutes: ValueSetter)
get utcMinutes(): number
setUTCMinutes(minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): this
withUTCMinutes(minutes?: ValueSetter, seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set seconds(seconds: ValueSetter)
get seconds(): number
getSeconds(): number
setSeconds(seconds?: ValueSetter, milliseconds?: ValueSetter): this
withSeconds(seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set utcSeconds(seconds: ValueSetter)
get utcSeconds(): number
setUTCSeconds(seconds?: ValueSetter, milliseconds?: ValueSetter): this
withUTCSeconds(seconds?: ValueSetter, milliseconds?: ValueSetter): ZonedDate
set milliseconds(milliseconds: ValueSetter)
get milliseconds(): number
getMilliseconds(): number
setMilliseconds(milliseconds?: ValueSetter): this
withMilliseconds(milliseconds?: ValueSetter): ZonedDate
set utcMilliseconds(milliseconds: ValueSetter)
get utcMilliseconds(): number
setUTCMilliseconds(milliseconds?: ValueSetter): this
withUTCMilliseconds(milliseconds?: ValueSetter): ZonedDate
get timezoneOffset(): number
getTimezoneOffset(): number
get offset(): number
getOffset(): number
get day(): number
get utcDay(): number
set time(time: ValueSetter)
get time(): number
getTime(): number
setTime(time?: ValueSetter): this
withTime(time?: ValueSetter): ZonedDate
toDate(): Date
toDateString: typeof Date.prototype.toDateString
toISOString: typeof Date.prototype.toISOString
toJSON: typeof Date.prototype.toJSON
toLocaleDateString: typeof Date.prototype.toLocaleDateString
toLocaleString: typeof Date.prototype.toLocaleString
toLocaleTimeString: typeof Date.prototype.toLocaleTimeString
toString: typeof Date.prototype.toString
toTimeString: typeof Date.prototype.toTimeString
toUTCString: typeof Date.prototype.toUTCString
valueOf: typeof Date.prototype.valueOf
}