From 67f43af9b65a7c79a30ca95d19e3d6b6f67601c8 Mon Sep 17 00:00:00 2001 From: Aaron King Date: Tue, 25 Jun 2013 16:52:24 -0400 Subject: [PATCH] moment: added support for isBefore, isAfter, isSame --- moment/moment.d.ts | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/moment/moment.d.ts b/moment/moment.d.ts index 2ba80d175..7f8dc19d4 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -115,6 +115,39 @@ interface Moment { daysInMonth(): number; isDST(): bool; + isBefore(b: Moment): bool; + isBefore(b: string): bool; + isBefore(b: Number): bool; + isBefore(b: Date): bool; + isBefore(b: Array): bool; + isBefore(b: Moment, granularity: string): bool; + isBefore(b: String, granularity: string): bool; + isBefore(b: Number, granularity: string): bool; + isBefore(b: Date, granularity: string): bool; + isBefore(b: Array, granularity: string): bool; + + isAfter(b: Moment): bool; + isAfter(b: string): bool; + isAfter(b: Number): bool; + isAfter(b: Date): bool; + isAfter(b: Array): bool; + isAfter(b: Moment, granularity: string): bool; + isAfter(b: String, granularity: string): bool; + isAfter(b: Number, granularity: string): bool; + isAfter(b: Date, granularity: string): bool; + isAfter(b: Array, granularity: string): bool; + + isSame(b: Moment): bool; + isSame(b: string): bool; + isSame(b: Number): bool; + isSame(b: Date): bool; + isSame(b: Array): bool; + isSame(b: Moment, granularity: string): bool; + isSame(b: String, granularity: string): bool; + isSame(b: Number, granularity: string): bool; + isSame(b: Date, granularity: string): bool; + isSame(b: Array, granularity: string): bool; + lang(language: string); lang(reset: bool); lang(): string; @@ -220,6 +253,39 @@ interface MomentStatic { duration(input: MomentInput): Duration; duration(object: any): Duration; duration(): Duration; + + isBefore(b: Moment): bool; + isBefore(b: string): bool; + isBefore(b: Number): bool; + isBefore(b: Date): bool; + isBefore(b: Array): bool; + isBefore(b: Moment, granularity: string): bool; + isBefore(b: String, granularity: string): bool; + isBefore(b: Number, granularity: string): bool; + isBefore(b: Date, granularity: string): bool; + isBefore(b: Array, granularity: string): bool; + + isAfter(b: Moment): bool; + isAfter(b: string): bool; + isAfter(b: Number): bool; + isAfter(b: Date): bool; + isAfter(b: Array): bool; + isAfter(b: Moment, granularity: string): bool; + isAfter(b: String, granularity: string): bool; + isAfter(b: Number, granularity: string): bool; + isAfter(b: Date, granularity: string): bool; + isAfter(b: Array, granularity: string): bool; + + isSame(b: Moment): bool; + isSame(b: string): bool; + isSame(b: Number): bool; + isSame(b: Date): bool; + isSame(b: Array): bool; + isSame(b: Moment, granularity: string): bool; + isSame(b: String, granularity: string): bool; + isSame(b: Number, granularity: string): bool; + isSame(b: Date, granularity: string): bool; + isSame(b: Array, granularity: string): bool; } declare var moment: MomentStatic;