diff options
author | JoelHMikael <joel.h.kronqvist@gmail.com> | 2022-01-13 09:36:07 +0200 |
---|---|---|
committer | JoelHMikael <joel.h.kronqvist@gmail.com> | 2022-01-13 09:36:07 +0200 |
commit | 1a1b117cc9eae2cc2ecfb3695bebe21daf08741b (patch) | |
tree | 1c4173b746e9b8af4bc0bd6e7ded34ad3f365100 /dbparse.js | |
parent | 21e79dcc1eabebfd661a2fd38681348ae9428c4e (diff) | |
download | LYLLRuoka-1a1b117cc9eae2cc2ecfb3695bebe21daf08741b.tar.gz LYLLRuoka-1a1b117cc9eae2cc2ecfb3695bebe21daf08741b.zip |
Made the parsing more inclusive
Diffstat (limited to 'dbparse.js')
-rw-r--r-- | dbparse.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 = [ |