@@ -199,7 +199,7 @@ function updateText() {
199199 document . getElementById ( "countdownLabel" ) . innerHTML = "School starts in: "
200200 document . getElementById ( 'timeToEndOfClass' ) . innerHTML = getTimeToStartOfSchoolString ( ) ;
201201 } else {
202- document . getElementById ( 'timeToEndOfClass' ) . innerHTML = getTimeToEndOfCurrentClassString ( ) ;
202+ document . getElementById ( 'timeToEndOfClass' ) . innerHTML = "No Class" ;
203203 }
204204
205205 document . getElementById ( "nextClass" ) . innerHTML = getClassName ( currentClassPeriodIndex + 1 )
@@ -217,7 +217,7 @@ function updateText() {
217217
218218 case CLASS_IN_SESSION_FLAG :
219219 document . getElementById ( "countdownLabel" ) . innerHTML = "...which ends in: " ;
220- document . getElementById ( 'timeToEndOfClass' ) . innerHTML = getTimeToEndOfCurrentClassString ( ) ;
220+ document . getElementById ( 'timeToEndOfClass' ) . innerHTML = getTimeStringFromObject ( getTimeTo ( schools [ selectedSchoolIndex ] . schedules [ currentScheduleIndex ] . classes [ getCurrentClassPeriodIndex ( ) ] . endTime ) ) ;
221221
222222 document . getElementById ( "nextClass" ) . innerHTML = getClassName ( currentClassPeriodIndex + 1 )
223223 document . getElementById ( "currentClass" ) . innerHTML = getClassName ( currentClassPeriodIndex )
@@ -507,18 +507,6 @@ function convertMillisecondsToTime(milliseconds) {
507507 return time
508508}
509509
510- /**
511- *
512- * @returns the time to the end of the current class as a string
513- */
514- function getTimeToEndOfCurrentClassString ( ) {
515- if ( classIsInSession ( ) ) {
516- return getTimeStringFromObject ( getTimeTo ( schools [ selectedSchoolIndex ] . schedules [ currentScheduleIndex ] . classes [ currentClassPeriodIndex ] . endTime ) ) ;
517- } else {
518- return "No Class"
519- }
520- }
521-
522510/**
523511 * This fucntion is used for calculating how long until school starts
524512 * @returns the time to the start of school as a string
@@ -536,20 +524,6 @@ function getTimeTo(timeObject) {
536524 return getTimeDelta ( getCurrentTimeObject ( ) , timeObject )
537525}
538526
539- /**
540- * this is a an unused method that was written for a feature that never got implemented and, as of this point in time, identical to @function getTimeToEndOfCurrentClassString()
541- *
542- * @returns the time to the start of the next class as a string
543- */
544- function getTimeToStartOfNextClassString ( ) {
545- if ( classIsInSession ( ) && currentClassPeriodIndex + 1 < schools [ selectedSchoolIndex ] . schedule [ selectedSchedule ] . classes . length ) {
546- return getTimeStringFromObject ( getTimeDelta ( schools [ selectedSchoolIndex ] . schedules [ currentScheduleIndex ] . classes [ currentClassPeriodIndex + 1 ] . startTime ) ) ;
547- } else {
548- return "No More Classes"
549- }
550- }
551-
552-
553527/**
554528 * converts a time object into a string
555529 *
0 commit comments