mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
moment: added support for isBefore, isAfter, isSame
This commit is contained in:
1 parent
44d44d0875
commit
67f43af9b6
1 file changed
+66
Vendored
+66
@@ -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;
|
||||
Reference in new issue
Block a user