mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #4089 from mnahkies/moment-timezone
Add missing overloads to moment-timezone
This commit is contained in:
@@ -8,11 +8,16 @@ june.tz('America/Los_Angeles').format('ha z');
|
||||
var a = moment.tz("2013-11-18 11:55", "America/Toronto");
|
||||
var b = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", "America/Toronto");
|
||||
var c = moment.tz(1403454068850, "America/Toronto");
|
||||
var d = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", true, "America/Toronto");
|
||||
|
||||
a.tz();
|
||||
|
||||
var arr = [2013, 5, 1],
|
||||
str = "2013-12-01",
|
||||
obj = { year : 2013, month : 5, day : 1 };
|
||||
|
||||
moment.tz("America/Los_Angeles");
|
||||
|
||||
moment.tz(arr, "America/Los_Angeles");
|
||||
moment.tz(str, "America/Los_Angeles");
|
||||
moment.tz(obj, "America/Los_Angeles");
|
||||
|
||||
Vendored
+3
@@ -7,6 +7,7 @@
|
||||
|
||||
declare module moment {
|
||||
interface Moment {
|
||||
tz(): string;
|
||||
tz(timezone: string): Moment;
|
||||
}
|
||||
|
||||
@@ -27,9 +28,11 @@ interface MomentZone {
|
||||
}
|
||||
|
||||
interface MomentTimezone {
|
||||
(timezone: string): moment.Moment;
|
||||
(date: number, timezone: string): moment.Moment;
|
||||
(date: number[], timezone: string): moment.Moment;
|
||||
(date: string, format: string, timezone: string): moment.Moment;
|
||||
(date: string, format: string, useStrict: boolean, timezone: string): moment.Moment;
|
||||
(date: Date, timezone: string): moment.Moment;
|
||||
(date: moment.Moment, timezone: string): moment.Moment;
|
||||
(date: Object, timezone: string): moment.Moment;
|
||||
|
||||
Reference in New Issue
Block a user