mmntjs-timezone 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,42 @@
1
+ // Type declarations for mmntjs-timezone
2
+ // Based on moment-timezone types (DefinitelyTyped, MIT)
3
+
4
+ import moment = require("mmntjs");
5
+
6
+ declare module "mmntjs" {
7
+ interface MomentZone {
8
+ name: string;
9
+ abbr(timestamp: number): string;
10
+ offset(timestamp: number): number;
11
+ utcOffset(timestamp: number): number;
12
+ parse(timestamp: number): number;
13
+ }
14
+
15
+ interface MomentTimezone {
16
+ (timezone?: string): moment.Moment;
17
+ (input: moment.MomentInput, timezone: string): moment.Moment;
18
+ (input: string, format: moment.MomentFormatSpecification, timezone: string): moment.Moment;
19
+ (input: string, format: moment.MomentFormatSpecification, strict: boolean, timezone: string): moment.Moment;
20
+
21
+ zone(timezone: string): MomentZone | null;
22
+ names(): string[];
23
+ guess(ignoreCache?: boolean): string;
24
+ setDefault(timezone?: string): typeof moment;
25
+
26
+ add(data: unknown): void;
27
+ link(links: unknown): void;
28
+ countries(): string[];
29
+ zonesForCountry(country: string, withOffset?: boolean): string[];
30
+ }
31
+
32
+ interface Moment {
33
+ tz(): string | undefined;
34
+ tz(timezone: string, keepLocalTime?: boolean): moment.Moment;
35
+ zoneAbbr(): string;
36
+ zoneName(): string;
37
+ }
38
+
39
+ const tz: MomentTimezone;
40
+ }
41
+
42
+ export = moment;
@@ -0,0 +1,42 @@
1
+ // Type declarations for mmntjs-timezone
2
+ // Based on moment-timezone types (DefinitelyTyped, MIT)
3
+
4
+ import moment = require("mmntjs");
5
+
6
+ declare module "mmntjs" {
7
+ interface MomentZone {
8
+ name: string;
9
+ abbr(timestamp: number): string;
10
+ offset(timestamp: number): number;
11
+ utcOffset(timestamp: number): number;
12
+ parse(timestamp: number): number;
13
+ }
14
+
15
+ interface MomentTimezone {
16
+ (timezone?: string): moment.Moment;
17
+ (input: moment.MomentInput, timezone: string): moment.Moment;
18
+ (input: string, format: moment.MomentFormatSpecification, timezone: string): moment.Moment;
19
+ (input: string, format: moment.MomentFormatSpecification, strict: boolean, timezone: string): moment.Moment;
20
+
21
+ zone(timezone: string): MomentZone | null;
22
+ names(): string[];
23
+ guess(ignoreCache?: boolean): string;
24
+ setDefault(timezone?: string): typeof moment;
25
+
26
+ add(data: unknown): void;
27
+ link(links: unknown): void;
28
+ countries(): string[];
29
+ zonesForCountry(country: string, withOffset?: boolean): string[];
30
+ }
31
+
32
+ interface Moment {
33
+ tz(): string | undefined;
34
+ tz(timezone: string, keepLocalTime?: boolean): moment.Moment;
35
+ zoneAbbr(): string;
36
+ zoneName(): string;
37
+ }
38
+
39
+ const tz: MomentTimezone;
40
+ }
41
+
42
+ export = moment;