forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
moment-timezone.d.ts
58 lines (45 loc) · 1.42 KB
/
moment-timezone.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
// Type definitions for moment-timezone.js 0.2.5
// Project: http://momentjs.com/timezone/
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../moment/moment.d.ts" />
declare module moment {
interface Moment {
tz(timezone: string): Moment;
}
interface MomentStatic {
tz: MomentTimezone;
}
}
interface MomentZone {
name: string;
abbrs: string[];
untils: number[];
offsets: number[];
abbr(timestamp: number): string;
offset(timestamp: number): number;
parse(timestamp: number): number
}
interface MomentTimezone {
(date: number, timezone: string): moment.Moment;
(date: number[], timezone: string): moment.Moment;
(date: string, format: string, timezone: string): moment.Moment;
(date: Date, timezone: string): moment.Moment;
(date: moment.Moment, timezone: string): moment.Moment;
(date: Object, timezone: string): moment.Moment;
zone(timezone: string): MomentZone;
add(packedZoneString: string): void;
add(packedZoneString: string[]): void;
link(packedLinkString: string): void;
link(packedLinkString: string[]): void;
load(data: {
version: string;
links: string[];
zones: string[];
}): void;
names(): string[];
}
declare module 'moment-timezone' {
var _tmp: moment.MomentStatic;
export = _tmp;
}