forked from nusmodifications/nusmods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
39 lines (33 loc) · 855 Bytes
/
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
36
37
38
39
export type WeekType =
| 'Instructional'
| 'Reading'
| 'Examination'
| 'Recess'
| 'Vacation'
| 'Orientation';
export type Semester = 'Semester 1' | 'Semester 2' | 'Special Sem 1' | 'Special Sem 2';
export interface AcadYear {
year: string;
startDate: Date;
}
export interface AcadWeek {
weekType: WeekType;
weekNumber: number | null;
}
export interface AcadWeekInfo {
year: string;
sem: Semester;
type: WeekType;
num?: number;
}
declare class AcademicCalendar {
getAcadYearStartDate(acadYear: string): Date;
getAcadYear(date: Date): AcadYear;
getAcadSem(weekNumber: number): string;
getAcadWeekName(weekNumber: number): AcadWeek;
getAcadWeekInfo(date: Date): AcadWeekInfo;
getExamWeek(year: string, semester: number): Date;
}
export default class NUSModerator {
static academicCalendar: AcademicCalendar;
}