diff options
Diffstat (limited to 'dbparse.js')
-rw-r--r-- | dbparse.js | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -1,3 +1,5 @@ +const weekdayToNumber = require("./Functions/dateFuncs.js").weekdayToNumber; + function getCharAmount(s, c) { let n = 0; @@ -62,24 +64,6 @@ function parseCluttered(s) return s.replaceAll(".", "").replaceAll(" ", "").toUpperCase(); } -function weekdayToNumber(s) -{ - const weekdays = [ - /ma.*/i, - /ti.*/i, - /ke.*/i, - /to.*/i, - /pe.*/i, - /la.*/i, - /su.*/i - ]; - for(let day = 0; day < weekdays.length; day++) - { - if (s.match(weekdays[day])) - return day; - } -} - async function writeShifts(data, DB) { let deletions = await Promise.all([ |