From b9318019f8398af36725ae07876623acdc8d1a90 Mon Sep 17 00:00:00 2001 From: apathytomorrow Date: Wed, 28 Jan 2015 15:26:47 +0000 Subject: [PATCH 1/3] Addd isDuration tests --- moment/moment-tests.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moment/moment-tests.ts b/moment/moment-tests.ts index d58a27fe3..dc11eeac8 100644 --- a/moment/moment-tests.ts +++ b/moment/moment-tests.ts @@ -195,6 +195,10 @@ moment.isMoment(); moment.isMoment(new Date()); moment.isMoment(moment()); +moment.isDuration(); +moment.isDuration(new Date()); +moment.isDuration(moment.duration()); + moment.localeData('fr'); moment(1316116057189).fromNow(); From 3fdfa45029acf79d78764e136b5abac8a80b5ee8 Mon Sep 17 00:00:00 2001 From: apathytomorrow Date: Wed, 28 Jan 2015 15:27:34 +0000 Subject: [PATCH 2/3] Added IsDuration tests --- moment/moment-external-tests.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moment/moment-external-tests.ts b/moment/moment-external-tests.ts index ced06cdbf..1b1d083ba 100644 --- a/moment/moment-external-tests.ts +++ b/moment/moment-external-tests.ts @@ -195,6 +195,10 @@ moment.isMoment(); moment.isMoment(new Date()); moment.isMoment(moment()); +moment.isDuration(); +moment.isDuration(new Date()); +moment.isDuration(moment.duration()); + moment.localeData('fr'); moment(1316116057189).fromNow(); From 0019e204e8c8aa5e8bd91a867baa25ab7c7ff7c5 Mon Sep 17 00:00:00 2001 From: apathytomorrow Date: Wed, 28 Jan 2015 15:28:45 +0000 Subject: [PATCH 3/3] Update moment.d.ts --- moment/moment.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moment/moment.d.ts b/moment/moment.d.ts index 4d315946b..6bd041c5c 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -399,6 +399,8 @@ declare module moment { invalid(parsingFlags?: Object): Moment; isMoment(): boolean; isMoment(m: any): boolean; + isDuration(): boolean; + isDuration(d: any): boolean; // Deprecated in 2.8.0. lang(language?: string): string;