aboutsummaryrefslogtreecommitdiff
path: root/dbparse.js
diff options
context:
space:
mode:
authorJoelHMikael <joel.h.kronqvist@gmail.com>2022-01-13 09:36:07 +0200
committerJoelHMikael <joel.h.kronqvist@gmail.com>2022-01-13 09:36:07 +0200
commit1a1b117cc9eae2cc2ecfb3695bebe21daf08741b (patch)
tree1c4173b746e9b8af4bc0bd6e7ded34ad3f365100 /dbparse.js
parent21e79dcc1eabebfd661a2fd38681348ae9428c4e (diff)
downloadLYLLRuoka-1a1b117cc9eae2cc2ecfb3695bebe21daf08741b.tar.gz
LYLLRuoka-1a1b117cc9eae2cc2ecfb3695bebe21daf08741b.zip
Made the parsing more inclusive
Diffstat (limited to 'dbparse.js')
-rw-r--r--dbparse.js4
1 files changed, 2 insertions, 2 deletions
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 = [