From 8429be8b1249eae2b98fb8c8bc78379fdaf08f30 Mon Sep 17 00:00:00 2001
From: ZervoTheProtogen <marco@zervo.org>
Date: Wed, 30 Aug 2023 16:19:25 +0200
Subject: [PATCH] base extract.js actually complete

---
 README.md  | 2 --
 extract.js | 6 +++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index f734553..585948e 100644
--- a/README.md
+++ b/README.md
@@ -5,5 +5,3 @@ Parses schoolsoft schedules from 'right_student_schedule.jsp' file into readable
 TEMPORARY REPO, WILL REMOVE
 
 CURRENTLY REWRITING ENTIRELY, DONT LOOK AT IT :)
-
-import('https://github.com/ZervoTheProtogen/schoolsoft-schema-parser/blob/main/grab.js')
diff --git a/extract.js b/extract.js
index 2208d26..7020a3c 100644
--- a/extract.js
+++ b/extract.js
@@ -64,12 +64,12 @@ function extract() {
         outEnd = scheduleItemTimesArray[1];
 
         // do calculations for which day it is
-        let endTrim = outEnd.replace(/:/g,'');
-        if (endTrim < lastEndtime) {
+        let startTrim = Number(outStart.replace(/:/g,''));
+        if (startTrim < lastEndtime) {
             console.log(day);
             day += 1;
         }
-        lastEndtime = endTrim;
+        lastEndtime = Number(outEnd.replace(/:/g,''));
         switch(day) {
             case 1:
                 outDay = 'mon';