-
Notifications
You must be signed in to change notification settings - Fork 67
/
index.d.ts
35 lines (28 loc) · 1.07 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import moment from 'moment';
declare module 'moment' {
interface Moment {
isHoliday(): boolean;
isBusinessDay(): boolean;
businessDaysIntoMonth(): number;
businessDiff(param: Moment, relative?: boolean): number;
businessAdd(param: number, period?: unitOfTime.Base): Moment;
businessSubtract(param: number, period?: unitOfTime.Base): Moment;
nextBusinessDay(): Moment;
prevBusinessDay(): Moment;
monthBusinessDays(partialEndDate?: Moment): Moment[];
monthNaturalDays(fromToday?: boolean): Moment[];
monthBusinessWeeks(fromToday?: boolean): Moment[][];
monthNaturalWeeks(fromToday?: boolean): Moment[][];
businessWeeksBetween(endDate: Moment): Moment[][];
}
interface LocaleSpecification {
holidays?: string[];
holidayFormat?: string;
forcedBusinessDays?: string[];
forcedBusinessDaysFormat?: string;
nextBusinessDayLimit?: number;
prevBusinessDayLimit?: number;
workingWeekdays?: number[];
}
}
export = moment;