-
Notifications
You must be signed in to change notification settings - Fork 0
/
Biztime.d.ts
57 lines (57 loc) · 1.3 KB
/
Biztime.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
interface Locale {
sunday: {
isWorkingDay: boolean;
times: string[];
};
monday: {
isWorkingDay: boolean;
times: string[];
};
tuesday: {
isWorkingDay: boolean;
times: string[];
};
wednesday: {
isWorkingDay: boolean;
times: string[];
};
thursday: {
isWorkingDay: boolean;
times: string[];
};
friday: {
isWorkingDay: boolean;
times: string[];
};
saturday: {
isWorkingDay: boolean;
times: string[];
};
}
interface holiday {
isOpen: boolean | null;
date: string;
times: string[];
}
export default class BizTime {
private locale;
private holidays;
constructor(locale: Locale, holidays: holiday[]);
private workingDays;
private getWorkingDays;
init(): void;
private hasValidTimes;
private convertToMill;
private getTodaysStartTime;
private getTodaysEndTime;
private getHolidayStartTime;
private getHolidayEndTime;
private getMonth;
private getDay;
getHoliday(dayToCheck: Date): holiday | undefined;
isHoliday(dayToCheck: Date): boolean;
isOpenOnHoliday(dayToCheck: Date): boolean;
isWorkingDay(dayToCheck: Date): boolean;
isWorkingTime(timeToCheck: Date): boolean;
}
export {};