From 1a1b117cc9eae2cc2ecfb3695bebe21daf08741b Mon Sep 17 00:00:00 2001 From: JoelHMikael Date: Thu, 13 Jan 2022 09:36:07 +0200 Subject: Made the parsing more inclusive --- dbparse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dbparse.js') diff --git a/dbparse.js b/dbparse.js index ec2d434..5f495e5 100644 --- a/dbparse.js +++ b/dbparse.js @@ -167,7 +167,7 @@ async function parseDay(data, day, DB) async function writeShifts(data, DB) { - weekdays = ["MAANANTAISIN", "TIISTAISIN", "KESKIVIIKKOISIN", "TORSTAISIN", "PERJANTAISIN"]; + weekdays = ["MAANANTAI", "TIISTAI", "KESKIVIIKKO", "TORSTAI", "PERJANTAI"]; let deletions = Promise.all([ DB.query_raw("DELETE FROM shifts"), DB.query_raw("DELETE FROM shiftnames") @@ -178,7 +178,7 @@ async function writeShifts(data, DB) for (let day = 0; day < weekdays.length; day++) { // find the start of the shifts of the day - i = getNextChar(data, "\n", findExpression(data, weekdays[day], i)); + i = getNextChar(data, "\n", findExpression(data, weekdays[day], i)) + 1; // find the end of the shifts of the day let end = [ -- cgit v1.2.3