The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!
<%
Function PeriodState()
Dim TWDate
TWDate= WeekDay(Now())
Dim TWTime
TWTime= TimeValue(Now())
If TWDate =1 Then DayState="Sunday"_
Else IF TWDate = 7 Then DayState="Saturday"_
Else DayState="Weekday"_
End IF
If (DayState = "Weekday") And (TWTime > "08:39") And (TWTime < "08:54") Then
PeriodState = "Chapel"
ElseIf (DayState = "Weekday") And (TWTime > "08:54") And (TWTime < "09:54") Then
PeriodState = "Lesson 1"
ElseIf (DayState = "Weekday") And (TWTime > "09:55") And (TWTime < "10:49") Then
PeriodState = "Lesson 2"
ElseIf (DayState = "Weekday") And (TWTime > "10:50") And (TWTime < "11:19") Then
PeriodState = "The Half"
ElseIf (DayState = "Weekday") And (TWTime > "11:20") And (TWTime < "12:19") Then
PeriodState = "Lesson 3"
ElseIf (DayState = "Weekday") And (TWTime > "12:20") And (TWTime < "13:14") Then
PeriodState = "Lesson 4"
ElseIf (DayState = "Weekday") And (TWTime > "13:15") And (TWTime < "13:59") Then
PeriodState = "Lunch"
ElseIf (DayState = "Weekday") And (TWTime > "14:00") And (TWTime < "14:19") Then
PeriodState = "Tutor Period"
ElseIf (DayState = "Weekday") And (TWTime > "14:20") And (TWTime < "15:19") Then
PeriodState = "Lesson 5"
ElseIf (DayState = "Weekday") And (TWTime > "15:20") And (TWTime < "16:14") Then
PeriodState = "Lesson 6"
ElseIf (DayState = "Weekday") And (TWTime > "16:15") And (TWTime < "17:29") Then
PeriodState = "After Four"
ElseIf (DayState = "Weekday") And (TWTime > "17:30") And (TWTime < "18:29") Then
PeriodState = "First Prep"
ElseIf (DayState = "Weekday") And (TWTime > "18:30") And (TWTime < "19:29") Then
PeriodState = ""
ElseIf (DayState = "Weekday") And (TWDate = "3") OR (TWDate = "5") AND (TWTime > "19:30") And (TWTime < "20:59") Then
PeriodState = "Second Prep (Late)"
ElseIf (DayState = "Weekday") And (TWDate = "2") OR (TWDate = "4") OR (TWDate = "6") AND (TWTime > "19:30") And (TWTime < "20:29") Then
PeriodState = "Second Prep"
ElseIf (DayState = "Weekday") And (TWDate = "3") OR (TWDate = "5") AND (TWTime > "21:00") And (TWTime < "21:29") Then
PeriodState = ""
ElseIf (DayState = "Weekday") And (TWDate = "2") OR (TWDate = "4") OR (TWDate = "6") AND (TWTime > "20:30") And (TWTime < "21:29") Then
PeriodState = ""
ElseIf (DayState = "Weekday") And (TWTime > "21:30") And (TWTime < "22:30") Then
PeriodState = "Quiet Time"
ElseIf (DayState = "Saturday") And (TWTime > "08:29") And (TWTime < "09:14") Then
PeriodState = "Lesson 1"
ElseIf (DayState = "Saturday") And (TWTime > "09:15") And (TWTime < "09:59") Then
PeriodState = "Lesson 2"
ElseIf (DayState = "Saturday") And (TWTime > "10:00") And (TWTime < "10:44") Then
PeriodState = "Lesson 3"
ElseIf (DayState = "Saturday") And (TWTime > "10:45") And (TWTime < "11:29") Then
PeriodState = "Lesson 4"
ElseIf (DayState = "Saturday") And (TWTime > "11:30") And (TWTime < "11:54") Then
PeriodState = "The Half"
ElseIf (DayState = "Saturday") And (TWTime > "11:55") And (TWTime < "12:45") Then
PeriodState = "Study Period"
ElseIf (DayState = "Saturday") And (TWTime > "12:45") Then
PeriodState = "Enjoy Your Weekend!"
ElseIf (DayState = "Sunday") Then
PeriodState = "Enjoy Your Weekend!"
Else
PeriodState = ""
End If
End Function
%>
<% Function writePeriod
response.write PeriodState()
End Function %>
<%Call writePeriod %>
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.