-
Notifications
You must be signed in to change notification settings - Fork 0
/
OLSschedule.js
216 lines (215 loc) · 8.36 KB
/
OLSschedule.js
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/*This file is just to break up the schedules into multiple files, and to be more efficient and use a function to
calculate the times of each separate schedule.*/
var dayArray;
if (getAWeek() === 0) {
// A WEEK
if (rightNow.getDay() == 1) {
dayArray = [
["A Block starts", 28800000],
["A Block ends", 32400000],
["B Block starts", 32640000],
["B Block ends", 38580000],
["T Block starts", 36480000],
["T Block ends", 38580000],
["D Block/Lunch B start", 38820000],
["D ends @ 12:21, Lunch B ends/Lunch A starts", 40620000],
["D ends @ 12:21, Lunch A ends", 42360000],
["D Block ends", 44460000],
["E Block starts", 44700000],
["E Block ends", 48300000],
["G Block starts [TRAVEL TO BHS]", 49500000],
["G Block ends", 53400000]
];
} else if (rightNow.getDay() == 2) {
dayArray = [
["C Block starts", 28800000],
["C Block ends", 33000000],
["E Block starts", 33300000],
["E Block ends", 37200000],
["D Block/Lunch B start", 37500000],
["D ends @ noon, Lunch B ends/Lunch A starts", 39300000],
["D ends @ noon, Lunch A ends", 40800000],
["D Block ends", 43200000],
["F Block starts [TRAVEL TO BHS]", 44400000],
["F Block ends", 48300000],
["G Block starts", 48600000],
["G Block ends", 52500000]
];
} else if (rightNow.getDay() == 3) {
dayArray = [
["A Block starts", 28800000],
["A Block ends", 32100000],
["B Block starts", 32340000],
["B Block ends", 35940000],
["C Block starts", 36180000],
["C ends @ 11:33, Lunch A starts", 37980000],
["C ends @ 11:33, Lunch A ends/Lunch B starts", 39780000],
["C Block ends", 41580000],
["E Block starts", 41820000],
["E Block ends", 45120000],
["D Block starts", 45360000],
["D Block ends", 48660000],
["G Block starts [TRAVEL TO BHS]", 49800000],
["G Block ends", 53100000]
];
} else if (rightNow.getDay() == 4) {
dayArray = [
["B Block starts", 30300000],
["B Block ends", 34500000],
["A Block starts", 34800000],
["A Block ends", 39000000],
["X Block starts [TRAVEL TO BHS]", 40500000],
["X Block ends", 42900000],
["G Block [LUNCH] starts", 43200000],
["G Block [LUNCH] ends", 48900000],
["F Block starts", 49200000],
["F Block ends", 53100000]
];
} else if (rightNow.getDay() == 5) {
dayArray = [
["B Block starts", 28800000],
["B Block ends", 32100000],
["C Block starts", 32340000],
["C Block ends", 35940000],
["T or H Block starts", 36180000],
["T or H Block ends", 37980000],
["E Block starts", 38220000],
["E ends @ 12:11, Lunch A starts", 40020000],
["E ends @ 12:11, Lunch A ends/Lunch B starts", 42120000],
["E Block [LUNCH] ends", 43860000],
["D Block starts", 44100000],
["D Block ends", 47700000],
["F Block starts [TRAVEL TO BHS]", 48900000],
["F Block ends", 52800000]
];
}
} //B WEEK
else if (getAWeek() == 1) {
if (rightNow.getDay() == 1) {
dayArray = [
["A Block starts", 28800000],
["A Block ends", 32400000],
["T Block starts", 32640000],
["T Block ends", 34440000],
["C Block starts", 34680000],
["C Block ends", 38580000],
["E Block/Lunch B start", 38820000],
["E ends @ 12:26, Lunch B ends/Lunch A starts", 40620000],
["E ends @ 12:26, Lunch A ends", 42360000],
["E Block ends", 44700000],
["F Block starts [TRAVEL TO BHS]", 46200000],
["F Block ends", 49500000],
["G Block starts", 49800000],
["G Block ends", 53400000]
];
} else if (rightNow.getDay() == 2) {
dayArray = [
["B Block starts", 28800000],
["B Block ends", 32700000],
["A Block starts", 33000000],
["A Block ends", 36900000],
["C Block [LUNCH] starts", 37200000],
["C ends @ noon, Lunch A starts", 39000000],
["C ends @ noon, Lunch A ends", 40500000],
["C ends @ noon, Lunch B starts", 41400000],
["C Block [LUNCH] ends", 43200000],
["D Block starts", 43500000],
["D Block starts", 47400000],
["F Block starts [TRAVEL TO BHS]", 48600000],
["F Block ends", 52200000]
];
} else if (rightNow.getDay() == 3) {
dayArray = [
["A Block starts", 28800000],
["A Block ends", 32400000],
["B Block starts", 32700000],
["B Block ends", 36900000],
["T or H Block starts", 36600000],
["T or H Block ends", 38400000],
["E Block/Lunch B start", 38700000],
["E ends @ 12:20, Lunch B ends", 40200000],
["E ends @ 12:20, Lunch A starts", 40500000],
["E ends @ 12:20, Lunch A ends", 42000000],
["E Block ends", 44400000],
["F Block starts [TRAVEL TO BHS]", 45600000],
["F Block ends", 49200000],
["G Block starts", 49500000],
["G Block ends", 53100000]
];
} else if (rightNow.getDay() == 4) {
dayArray = [
["C Block starts", 34500000],
["C Block ends", 38100000],
["D Block starts", 38400000],
["D Block ends", 42000000],
["F Block/Lunch B starts [TRAVEL TO BHS]", 43200000],
["F ends @ 1:40, Lunch B ends/Lunch A starts", 45000000],
["F Block [LUNCH] ends", 49200000],
["G Block starts", 49500000],
["G Block ends", 53400000]
];
} else if (rightNow.getDay() == 5) {
dayArray = [
["A Block starts", 29700000],
["A Block ends", 33600000],
["B Block starts", 33900000],
["B Block ends", 37800000],
["C Block [LUNCH] starts", 38100000],
["C ends @ 12:10, lunch A starts", 39900000],
["C ends @ 12:10, Lunch A ends", 41400000],
["C ends @ 12:10, Lunch B starts", 42000000],
["C Block ends", 43800000],
["D Block starts", 44100000],
["D Block ends", 48300000],
["E Block starts", 48600000],
["E Block ends", 52800000]
];
}
//SPECIAL SCHEDULE
} else if (getAWeek() == 2) {
if (rightNow.getDay() == 1) {
dayArray = [
["A Block starts", 28800000],
["A Block ends", 33000000],
["B Block starts", 33300000],
["B Block ends", 37500000],
["C ends @ 12:05, Lunch B starts", 37800000],
["C ends @ 12:05, Lunch B ends/Lunch A starts", 39300000],
["C ends @ 12:05, Lunch A ends", 41100000],
["C Block ends", 43500000],
["F Block @ BHS starts", 44700000],
["F Block ends", 48900000],
["G Block starts", 49200000],
["G Block ends", 53400000]
];
}
if (rightNow.getDay() == 2) {
dayArray = [
["A Block starts", 28800000],
["A Block ends", 33000000],
["T Block starts", 33300000],
["T Block ends", 35400000],
["E Block starts", 35700000],
["E ends @ 11:40, Lunch starts", 38400000],
["E ends @ 11:40, Lunch ends", 40200000],
["E Block ends", 42000000],
["F Block @ BHS starts", 43500000],
["F Block ends", 47700000],
["G Block starts", 48000000],
["G Block ends", 52200000]
];
}
if (rightNow.getDay() == 3) {
dayArray = [
["C Block starts", 30000000],
["C Block ends", 33300000],
["D Block starts", 33600000],
["D Block ends", 36900000],
["E Block starts", 37200000],
["E Block ends", 40500000]
];
}
}
var OLSMap = new Map(dayArray);
console.log("9th OLS calc");
calcTime(OLSMap, "OLStime");