aboutsummaryrefslogtreecommitdiff
path: root/dbparse.js
diff options
context:
space:
mode:
Diffstat (limited to 'dbparse.js')
-rw-r--r--dbparse.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/dbparse.js b/dbparse.js
index b2204bd..dde0ff5 100644
--- a/dbparse.js
+++ b/dbparse.js
@@ -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([