aboutsummaryrefslogtreecommitdiff
path: root/dbparse.js
diff options
context:
space:
mode:
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 = [