From 48d6f855d3302343fa8158b40ce25a8104e8f7e6 Mon Sep 17 00:00:00 2001 From: gayansolid Date: Thu, 25 Feb 2016 14:00:16 +0530 Subject: [PATCH 1/4] added zoneAbbr() ,zoneName() support --- moment-timezone/moment-timezone.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moment-timezone/moment-timezone.d.ts b/moment-timezone/moment-timezone.d.ts index 407f99d5dd..5d7d24bf7c 100644 --- a/moment-timezone/moment-timezone.d.ts +++ b/moment-timezone/moment-timezone.d.ts @@ -9,6 +9,8 @@ declare module moment { interface Moment { tz(): string; tz(timezone: string): Moment; + zoneAbbr() :Moment; + zoneName() :Moment; } interface MomentStatic { From 9e95ea8ede147d9822f10cffd3d32799ec121216 Mon Sep 17 00:00:00 2001 From: gayansolid Date: Thu, 25 Feb 2016 14:09:41 +0530 Subject: [PATCH 2/4] fixed indent --- moment-timezone/moment-timezone.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moment-timezone/moment-timezone.d.ts b/moment-timezone/moment-timezone.d.ts index 5d7d24bf7c..42dd4b9f7a 100644 --- a/moment-timezone/moment-timezone.d.ts +++ b/moment-timezone/moment-timezone.d.ts @@ -9,7 +9,7 @@ declare module moment { interface Moment { tz(): string; tz(timezone: string): Moment; - zoneAbbr() :Moment; + zoneAbbr() :Moment; zoneName() :Moment; } From b1cb6594a2fb981fd51b3d1982ad244272b6846a Mon Sep 17 00:00:00 2001 From: gayansolid Date: Thu, 25 Feb 2016 14:14:26 +0530 Subject: [PATCH 3/4] fixed tests --- moment-timezone/moment-timezone-tests.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/moment-timezone/moment-timezone-tests.ts b/moment-timezone/moment-timezone-tests.ts index d01ea027c6..cfd831b5ea 100644 --- a/moment-timezone/moment-timezone-tests.ts +++ b/moment-timezone/moment-timezone-tests.ts @@ -79,3 +79,8 @@ moment.tz.names(); moment.tz.setDefault('America/Los_Angeles'); moment.tz.guess(); + +moment.tz.zoneAbbr(); + +moment.tz.zoneName(); + From 625087335afded51bc52a45823ff98cce2dd3933 Mon Sep 17 00:00:00 2001 From: gayansolid Date: Thu, 25 Feb 2016 14:19:08 +0530 Subject: [PATCH 4/4] fixed tests --- moment-timezone/moment-timezone-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moment-timezone/moment-timezone-tests.ts b/moment-timezone/moment-timezone-tests.ts index cfd831b5ea..410c45fe2e 100644 --- a/moment-timezone/moment-timezone-tests.ts +++ b/moment-timezone/moment-timezone-tests.ts @@ -80,7 +80,7 @@ moment.tz.setDefault('America/Los_Angeles'); moment.tz.guess(); -moment.tz.zoneAbbr(); +moment.tz('America/Los_Angeles').zoneAbbr(); -moment.tz.zoneName(); +moment.tz('America/Los_Angeles').zoneName();